Quiz on Lists in Python
Python has many inbuilt data structres which are available for users to directly put to use. Some of the standard data structures are Lists, Tuples, Dictionaries and many more.
In this Python quiz, we will learn more about the Lists and check our understanding of the same. All the best!
Quiz Summary
0 of 15 Questions completed
Questions:
Information
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
Results
Results
0 of 15 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
Categories
- Not categorized 0%
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- Current
- Review / Skip
- Answered
- Correct
- Incorrect
- Question 1 of 15
1. Question
Which of the following is true about lists in Python?
CorrectIncorrect - Question 2 of 15
2. Question
Which of the following Python function is used to find the length of the list in Python?
CorrectIncorrect - Question 3 of 15
3. Question
Which of the following is not the correct syntax to initiate a list in python?
CorrectIncorrect - Question 4 of 15
4. Question
Which of the following is the correct code to insert an element into the list?
CorrectIncorrect - Question 5 of 15
5. Question
Which of the below-given methods is used to clear the contents of list while keeping the list intact?
CorrectIncorrect - Question 6 of 15
6. Question
Find the output of the code given below?
# Code startsl1 = [1,3,5,4]
l2 = [3,4,5,6,12,41]print(l1+l2)
# Code Ends
CorrectIncorrect - Question 7 of 15
7. Question
What will be the output of the following piece of code?
# Code startscontent = [‘QuizOrbit’, ‘is’ , ‘the’ , ‘best’,’Python’, ‘practice’,’platform.’]
print(” “.join(content))
# Code Ends
CorrectIncorrect - Question 8 of 15
8. Question
Find the output of code given below?
# Code startsl1 = [1,0,2,8,10]
l2 = [12,8,15,23]
l3 = [0,2,8]l4 = (l1*2)+l3+l2
print(l4)
# Code Ends
CorrectIncorrect - Question 9 of 15
9. Question
Find the output of the code given below?
# Code startsl = [23,74,89,12,14,23]
l2 = [13,47,89]l.extend(l2)
l.pop()
lFinal = l
lFinal.reverse()
print(lFinal)# Code Ends
CorrectIncorrect - Question 10 of 15
10. Question
Find the output of the code given below?
# Code startslContent = [i*2//4 for i in range(20,50,5)]
lContent.clear()
lContent.append(34)
lContent.append(23)
lContent.append(89)
print(lContent.index(23))# Code Ends
CorrectIncorrect - Question 11 of 15
11. Question
Predict the output of the code snippet given below?
# Code starts
numbers = [num+3 for num in range(2,10)]
numbers.pop()
numbers = numbers[:5]
print(numbers[::-1])
# Code Ends
CorrectIncorrect - Question 12 of 15
12. Question
What will be the output of the code given below?
# Code starts
exp = [28,100,89,35,69,74,21]
exp.sort()
for i in range(0,5):
if i > 21:
exp[i]+=10
sumFinal = sum(exp[0:])
print(sumFinal)
# Code Ends
CorrectIncorrect - Question 13 of 15
13. Question
Find the output of the code given below?
# Code startsl1 = [89,56,47,23]
l2 = [89,45,21,78]print(l1>l2)
# Code Ends
CorrectIncorrect - Question 14 of 15
14. Question
What will be the output of the code given below?
# Code startsorg = ‘QuizOrbit is the best!’
print(org[-1:-5:-2])
# Code Ends
CorrectIncorrect - Question 15 of 15
15. Question
What will be the output of the code given below?
# Code starts
content = [2, 8, 7, 9, 23, 1]
if 67 in content:
content[content.index(67)] = 0
else:
content = [num+12 for num in content]
content.sort()
content.pop()
content.append(67)
print(content)
# Code Ends
CorrectIncorrect
Summary
We hope you might have gauged your understanding of Python Lists with this quiz. In case of any queries put them in the comments. Also, make sure to clear all the concepts of Lists before moving on to the next quiz. Happy Learning!