What will be the output of the following Python code?
list1 = [11, 2, 23] list2 = [11, 2, 2] print(list1 < list2)
True
False
Error
None
list1.add(5)
list1.append(5)
list1.addLast(5)
list1.addEnd(5)
list1.insert(3, 5)
list1.insert(2, 5)
list1.add(3, 5)
list1.append(3, 5)
list1.remove(“hello”)
list1.remove(hello)
list1.removeAll(“hello”)
list1.removeOne(“hello”)
0
1
4
2
[3, 4, 5, 20, 5, 25, 1, 3]
[1, 3, 3, 4, 5, 5, 20, 25]
[25, 20, 5, 5, 4, 3, 3, 1]
[3, 1, 25, 5, 20, 5, 4, 3]
[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, 5, 20, 5, 25, 1, 3]
[1, 3, 4, 5, 20, 5, 25]
[3, 4, 5, 20, 5, 25, 1]
>>>"Welcome to Python".split()
[“Welcome”, “to”, “Python”]
(“Welcome”, “to”, “Python”)
{“Welcome”, “to”, “Python”}
“Welcome”, “to”, “Python”
mylist=list("a#b#c#d".split('#')) print(mylist)
[‘a’, ‘b’, ‘c’, ‘d’]
[‘a b c d’]
[‘a#b#c#d’]
[‘abcd’]
myList = [1, 5, 5, 5, 5, 1] max = myList[0] indexOfMax = 0 for i in range(1, len(myList)): if myList[i] > max: max = myList[i] indexOfMax = i print(indexOfMax)
3
myList = [1, 2, 3, 4, 5, 6] for i in range(1, 6): myList[i - 1] = myList[i] for i in range(0, 6): print(myList[i], end = " ")
2 3 4 5 6 1
6 1 2 3 4 5
2 3 4 5 6 6
1 1 2 3 4 5
list1 = [1, 3] list2 = list1 list1[0] = 4 print(list2)
[1, 3]
[4, 3]
[1, 4]
[1, 3, 4]
def f(values): values[0] = 44 v = [1, 2, 3] f(v) print(v)
[1, 44]
[1, 2, 3, 44]
[44, 2, 3]
[1, 2, 3]
Heeeo
Heelo
Heleo
s[]
s.getitem(3)
s.__getitem__(3)
s.getItem(3)
s.__len__()
len(s)
size(s)
s.size()
i.__add(j)
i.__add__(j)
i.__Add(j)
i.__ADD(j)