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

1.  [2, 33, 222, 14]

2.  Error

3.  25

4.  [25, 14, 222, 33, 2]

4

[2, 33, 222, 14]

Explanation :
No Explanation available for this question

# What will be the output of the following Python code >>>names = ['Amir', 'Bear', 'Charlton', 'Daman'] >>>print(names[-1][-1])

1.  A

2.  Daman

3.  Error

4.  n

4

n

Explanation :
No Explanation available for this question

# What will be the output of the following Python code names1 = ['Amir', 'Bear', 'Charlton', 'Daman'] names2 = names1 names3 = names1[:] names2[0] = 'Alice' names3[1] = 'Bob' sum = 0 for ls in (names1, names2, names3): if ls[0] == 'Alice': sum += 1 if ls[1] == 'Bob': sum += 10 print sum

1.  11

2.  12

3.  21

4.  22

4

12

Explanation :
No Explanation available for this question

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

1.  [2, 6, 4]

2.  [1, 3, 2, 1, 3]

3.  [1, 3, 2, 1, 3, 2]

4.  [1, 3, 2, 3, 2, 1]

4

[1, 3, 2, 1, 3, 2]

Explanation :
No Explanation available for this question

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

1.  [0, 1, 2, 3]

2.  [0, 1, 2, 3, 4]

3.  [0.0, 0.5, 1.0, 1.5]

4.  [0.0, 0.5, 1.0, 1.5, 2.0]

4

[0.0, 0.5, 1.0, 1.5]

Explanation :
No Explanation available for this question

# What will be the output of the following Python code >>>list1 = [11, 2, 23] >>>list2 = [11, 2, 2] >>>list1 < list2

1.  True

2.  False

3.  Error

4.  None

4

False

Explanation :
No Explanation available for this question

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

2.  list1.append(5)

4

list1.append(5)

Explanation :
No Explanation available for this question

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

1.  list1.insert(3, 5)

2.  list1.insert(2, 5)

4.  list1.append(3, 5)

4

list1.insert(2, 5)

Explanation :
No Explanation available for this question

# To remove string “hello” from list1, we use which command

1.  list1.remove(“hello”)

2.  list1.remove(hello)

3.  list1.removeAll(“hello”)

4.  list1.removeOne(“hello”)

4

list1.remove(“hello”)

Explanation :
No Explanation available for this question

1.  0

2.  1

3.  4

4.  2

4