Python - Lists

page 1 out of 5

page 1 out of 5


Question 1     

Which of the following commands will create a list?






Question 2     

What is the output when we execute list(“hello”)?






Question 3     

Suppose list_Example is [‘h’,’e’,’l’,’l’,’o’], what is len(list_Example)?






Question 4     

Suppose list1 is [4, 2, 2, 4, 5, 2, 1, 0], Which of the following is correct syntax for slicing operation?






Question 5     

Suppose list1 is [2, 33, 222, 14, 25], What is list1[-1]?






Question 6     

Suppose list1 is [2, 33, 222, 14, 25], What is list1[:-1]?






Question 7     

Suppose list1 is [1, 3, 2], What is list1 * 2?






Question 8     

Suppose list1 = [0.5 * x for x in range(0, 4)], list1 is:






Question 9     

To add a new element to a list we use which command?






Question 10     

To insert 5 to the third position in list1, we use which command?





page 1 out of 5

page 1 out of 5


Sign Up Page

Oops!!

To view the solution need to Login



Score : 0 / 0
L
o
a
d
i
n
g
.
.
.