71. What will be the output of the following Python code?
x = 'abcd'
for i in range(len(x)):
print(i)
x = 'abcd'
for i in range(len(x)):
print(i)
72. What will be the output of the following Python code?
x = "abcdef"
while i in x:
print(i, end=" ")
x = "abcdef"
while i in x:
print(i, end=" ")
73. What will be the output of the following Python code?
x = "abcdef"
i = "a"
while i in x:
x = x[1:]
print(i, end = " ")
x = "abcdef"
i = "a"
while i in x:
x = x[1:]
print(i, end = " ")
74. What will be the output of the following Python code?
x = "abcdef"
i = "a"
while i in x[1:]:
print(i, end = " ")
x = "abcdef"
i = "a"
while i in x[1:]:
print(i, end = " ")
75. What will be the output of the following Python code?
x = "abcdef"
i = "i"
while i in x:
print(i, end=" ")
x = "abcdef"
i = "i"
while i in x:
print(i, end=" ")
76. What will be the output of the following Python code?
x = "abcdef"
i = "a"
while i in x:
x = x[:-1]
print(i, end = " ")
x = "abcdef"
i = "a"
while i in x:
x = x[:-1]
print(i, end = " ")
77. What will be the output of the following Python code?
x = "abcdef"
i = "a"
while i in x[:-1]:
print(i, end = " ")
x = "abcdef"
i = "a"
while i in x[:-1]:
print(i, end = " ")
78. What will be the output of the following Python code?
i = 0
while i < 3:
print(i)
i += 1
else:
print(0)
i = 0
while i < 3:
print(i)
i += 1
else:
print(0)
79. What will be the output of the following Python code?
i = 0
while i < 5:
print(i)
i += 1
if i == 3:
break
else:
print(0)
i = 0
while i < 5:
print(i)
i += 1
if i == 3:
break
else:
print(0)
80. What will be the output of the following Python code?
x = "abcdef"
i = "a"
while i in x:
print(i, end = " ")
x = "abcdef"
i = "a"
while i in x:
print(i, end = " ")