JavaScript isn't enabled in your browser, so this file can't be opened. Enable and reload.
Python List
Test your Python skills with w3resource' quiz. This page contains interesting quizzes related to Python list The test contains 32 questions with no time limit. You will have to read all the given questions, answers and click over the correct answer.
Sign in to Google
to save your progress.
Learn more
* Indicates required question
Let list1 = [0.5 * a for a in range(0, 4)], list1 is ________
*
1 point
[0, 1, 2, 3]
[0, 1, 2, 3, 4]
[0.0, 0.5, 1.0, 1.5]
[0.0, 0.5, 1.0, 1.5, 2.0]
What Will be The output Of the following code snippet?
*
1 point
1 1
1 33
3 1
3 33
Let list1 = [3, 4, 5, 20, 5, 25, 1, 3], what is list1.index(5)?
*
1 point
0
4
1
2
What Will be The output Of the following code snippet?
*
1 point
0
1
2
3
4
Let list1 = [1, 3, 2, 4, 5, 2, 1, 0], What is list1[-1]?
*
1 point
3
5
1
0
What is the output when we execute list(“hello”)?
*
1 point
[‘h’, ‘e’, ‘l’, ‘l’, ‘o’]
[‘hello’]
[‘llo’]
[‘olleh’]
"Welcome to Python".split() is ________
*
1 point
["Welcome", "to", "Python"]
("Welcome", "to", "Python")
{"Welcome", "to", "Python"}
"Welcome", "to", "Python"
list1 = [11, 2, 23] and list2 = [11, 2, 2], list1 < list2 is ________
*
1 point
True
False
Let list1 = [3, 4, 5, 18, 5, 22, 1, 2], what is len(list1)?
*
1 point
6
7
8
5
4
Let list1 = [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after list1.reverse()?
*
1 point
[3, 4, 5, 20, 5, 25, 1, 3]
[1, 3, 3, 4, 5, 5, 20, 25]
[25, 20, 5, 5, 4, 3, 3, 1]
[1, 3, 4, 5, 20, 5, 25, 3]
[3, 1, 25, 5, 20, 5, 4, 3]
What will be the output of the following code snippet?
*
1 point
2 3 4 5 6 1
1 1 2 3 4 5
6 1 2 3 4 5
1 2 3 4 4
Let list1 = [3, 4, 5, 20, 5, 25, 1, 3], what is max(list1)?
*
1 point
5
4
8
25
1
Let list1 = [1, 3, 2, 4, 5, 2, 1, 0], Which of the following is correct?
*
1 point
print(list1[0])
print(list1[:2])
print(list1[:-2])
print(list1[4:6])
Let list1 = [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after list1.extend([34, 5])?
*
1 point
[3, 4, 5, 20, 5, 25, 1, 3, 34, 5]
[1, 3, 3, 4, 5, 5, 20, 25, 34, 5]
[25, 20, 5, 5, 4, 3, 3, 1, 34, 5]
[1, 3, 4, 5, 20, 5, 25, 3, 34, 5]
[3, 1, 25, 5, 20, 5, 4, 3, 34, 5]
Let list1 = [2, 3, 4], What is list1 * 2?
*
1 point
[2, 6, 4]
[2, 4, 3, 2, 4]
[2, 3, 4, 2, 3, 4]
[2, 3, 4, 4, 3, 2]
To remove string "red" from list1, use _______.
*
1 point
list1.remove("red")
list1.remove(red)
list1.removeAll("red")
list1.removeOne("red")
Let list1 = [3, 4, 5, 20, 5, 25, 1, 3], what is list1.count(5)?
*
1 point
0
4
1
2
What will be the output of the following code snippet?
*
1 point
[1, 2, 3, 33]
[1, 2, 3]
[1, 33]
[33, 2, 3]
To insert 5 to the third position in list1, use _______.
*
1 point
list1.insert(3, 5)
list1.insert(2, 5)
list1.add(3, 5)
list1.append(3, 5)
What will be the output of the following code snippet?
*
1 point
[2] [3] [4]
1 2 3
[2, 3, 4]
[2] [2, 3] [2, 3, 4]
To add 5 to the end of list1, use _______.
*
1 point
list1.add(5)
list1.append(5)
list1.addLast(5)
list1.addEnd(5)
What will be the output of the following code snippet?
*
1 point
[2, 3]
[1, 3]
[3, 2]
[1, 2, 3]
Let list1 = [0, 3, 2], what is sum(list1)?
*
1 point
5
4
6
2
1
Let list1 = [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after list1.sort()?
*
1 point
[3, 4, 5, 20, 5, 25, 1, 3]
[1, 3, 3, 4, 5, 5, 20, 25]
[25, 20, 5, 5, 4, 3, 3, 1]
[1, 3, 4, 5, 20, 5, 25, 3]
What is list("a#b#c#d".split('#'))?
*
1 point
['a', 'b', 'c', 'd']
['a b c d']
['a#b#c#d']
['abcd']
list1 = [11, 2, 23] and list2 = [2, 11, 23], list1 == list2 is ________
*
1 point
True
False
What is list("pqrs")?
*
1 point
['p', 'q', 'r', 's']
['pq']
['rs']
['pqrs']
Let list1 = [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after list1.pop(1)?
*
1 point
[3, 4, 5, 20, 5, 25, 1, 3]
[1, 3, 3, 4, 5, 5, 20, 25]
[3, 5, 20, 5, 25, 1, 3]
[1, 3, 4, 5, 20, 5, 25]
[3, 1, 25, 5, 20, 5, 4]
Let list1 = [3, 2, 5, 10, 5, 24, 1, 3], what is min(list1)?
*
1 point
5
4
8
25
1
__________ creates a list.
*
1 point
list1 = list()
list1 = []
list1 = list([12, 4, 4])
list1 = [12, 4, 4]
list1 = [1, "3", "red"]
Let list1 = [1, 3, 2, 4, 5, 2, 1, 0], What is list1[:-1]?
*
1 point
0
[1, 3, 2, 4, 5, 2, 1]
[1, 3, 2, 4, 5, 2]
[1, 3, 2, 4, 5, 2, 1, 0]
To shuffle list1, use _______.
*
1 point
list1.shuffle()
shuffle(list1)
random.shuffle(list1)
random.shuffleList(list1)
Submit
Clear form
Forms
This content is neither created nor endorsed by Google.
Report Abuse
Terms of Service
Privacy Policy
Help and feedback
Contact form owner
Help Forms improve
Report