Test your knowledge about basics of lists in python with these👇 questions
1. Which of the following statements is true about Python lists?
Anonymous Quiz
6%
A) Lists are immutable.
84%
B) Lists can contain elements of different data types.
10%
C) Lists must contain only elements of the same data type.
0%
D) Lists do not support slicing.
2. How do you create an empty list in Python?
Anonymous Quiz
22%
A) my_list = ()
10%
B) my_list = {}
68%
C) my_list = []
0%
D) my_list = None
3. How do you create a list in Python?
Anonymous Quiz
11%
A) my_list = {1, 2, 3}
78%
B) my_list = [1, 2, 3]
11%
C) my_list = (1, 2, 3)
0%
D) my_list = "1, 2, 3"
4. Why are lists commonly used in Python?
Anonymous Quiz
3%
A) They can only store numbers
86%
B) They allow storing a sequence of items in a single variable
6%
C) They are faster than other data structures
6%
D) They can only store text data
5. Why are lists preferred for storing a collection of data items in Python?
Anonymous Quiz
9%
A) Lists automatically sort the items
6%
B) Lists are read-only and cannot be changed
73%
C) Lists allow easy addition, removal, and access of items
12%
D) Lists consume less memory compared to other data structures
❤5
አስተማሪ ታሪክ ነው በትግስት አንብቡትWhat a Waste:
A mother camel and her baby were lying down, soaking up the sun. The baby camel asked his mom, “Why do we have these big bumps on our back?”
The mom stopped to think and then said, “We live in the desert where there is not much water available. Our humps store water to help us survive on long journeys. “
The baby camel then stopped to think and said, “Well, why do we have long legs with rounded feet?”
His mother replied, “They are meant to help us walk through sand.”
The baby asked a third question, “Why are my eyelashes so long?”
The mother replied, “Your long eyelashes offer you protection from sand when it blows in the wind.”
Finally, the baby said, “If we have all of these natural abilities given to us to walk through the desert, what’s the use for camels in the Zoo?”
The Moral:
The skills and abilities that you possess won’t be useful if you’re not in the right environment.
You’ve probably heard of a professional who ditched his or her career to follow their dreams–or the person who remains unfulfilled in their job, but doesn’t try to make a change.
If you’re stuck in a career that isn’t the right fit, you have to do some self-reflection to realize where your strengths lie that are going to waste. Turn to people that you know the best as well as professionals in any given market so you can start thinking about what may be better for you. Think big and remain open to new ideas.
#EnglishStories
#Inspiration
@python_pioneers
@python_pioneers
❤4
Python Pioneers: A Beginner's Guide 🇪🇹
አስተማሪ ታሪክ ነው በትግስት አንብቡት What a Waste: A mother camel and her baby were lying down, soaking up the sun. The baby camel asked his mom, “Why do we have these big bumps on our back?” The mom stopped to think and then said, “We live in the desert where there…
The skills and abilities that you possess won’t be useful if you’re not in the right environment.
መልካም ምሽት ይሁንላችሁ!
#Quotes
@python_pioneers
❤6
➡️⏭
Next : Accessing a List in Python
⌚️8 : 30 EAT
...
Next : Accessing a List in Python
⌚️8 : 30 EAT
...