Suppose list1 is [1, 3, 2], What is list1 * 2?
What will be the output of the following Python code?
print('a'.maketrans('ABC', '123'))
What will be the output of the following Python code?
x = (i for i in range(3))
for i in x:
print(i)
What is the output of the given code?
List=['A','b','e','k','u','s']
sList=List[4:6]
print(sList)
What is the output of the following code?
while 4 == 4:
print('4')
o=0
e=0
n=5
for i in range(n):
x=int(input())
if x%2 == 1:
e+=1
else:
o+=1
print(o)
if input is
4
5
6
7
8
then what is the output of the above code ____?
What will be the output of the following Python code?
def getMonth(m):
if m < 1 or m > 12:
raise ValueError("Invalid")
print(m)
getMonth(6)
What will be the output of the following Python code snippet?
a={1:"A",2:"B",3:"C"}
print(a.setdefault(3))