This is a timed quiz.
You have 5 minutes to complete the 10 questions in this quiz.
Slicing is used to extract a part of the list.
Single element is not treated as list.
List is enclosed in curly brackets.
Operator & concatenates one list to the end of other list.
Operator * repeats the content of a list by specified number of times.
Which of the following commands will create a list?
list1 = list()
list1 = []
list1 = list([1, 2, 3])
all of the mentioned
Suppose list1 is [2, 33, 222, 14, 25], What is list1[:-1]?
[2, 33, 222, 14]
Error
25
[25, 14, 222, 33, 2]
Suppose list1 is [1, 3, 2], What is list1 * 2?
[2, 6, 4]
[1, 3, 2, 1, 3]
[1, 3, 2, 1, 3, 2]
[1, 3, 2, 3, 2, 1]
What will be the output of the following Python code? >>>"Welcome to Python".split()
[“Welcome”, “to”, “Python”]
(“Welcome”, “to”, “Python”)
{“Welcome”, “to”, “Python”}
“Welcome”, “to”, “Python”
To which of the following the “in” operator can be used to check if an item is in it?
Lists
Dictionary
Set
All of the mentioned