Python Interview Questions-4
Python Interview Questions-4
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
19. What is the output, Suppose list1 is [1, 3, 2], What is list1 * 2?
20. What is the output when we execute list(“hello”)?