a) + b) * c) - d) All of the mentioned Answer: c Explanation: ...
View Question
What will be the output of the following Python code?
>>> str1 = ‘hello’
>>> str2 = ‘,’
>>> str3 = ‘world’
>>> str1[-1:]
What will be the output of the following Python code? >>> str1 = 'hello' >>> str2 = ','
View QuestionThe output of executing string.ascii_letters can also be achieved by:
a) string.ascii_lowercase_string.digits b) string.ascii_lowercase+string.ascii_uppercase c) string.letters d) ...
View Question
What will be the output of the following Python statement?
>>>”abcd”[2:]
What will be the output of the following Python statement? >>>"abcd"[2:] a) a b) ...
View Question
What will be the output of the following Python statement?
>>>”a”+”bc”
What will be the output of the following Python statement? >>>"a"+"bc" a) a b) ...
View Question
What will be the output of the following Python code snippet?
x = 2
for i in range(x):
x -= 2
print (x)
What will be the output of the following Python code snippet? x = 2 for i in range(x):
View Question
What will be the output of the following Python code snippet?
x = 2
for i in range(x):
x += 1
print (x)
What will be the output of the following Python code snippet? x = 2 for i in range(x):
View Question
What will be the output of the following Python code snippet?
for i in ”:
print (i)
What will be the output of the following Python code snippet? for i in '': ...
View Question
What will be the output of the following Python code snippet?
for i in ‘abcd'[::-1]:
print (i)
What will be the output of the following Python code snippet? for i in 'abcd'[::-1]: ...
View Question
What will be the output of the following Python code snippet?
for i in ”.join(reversed(list(‘abcd’))):
print (i)
What will be the output of the following Python code snippet? for i in ''.join(reversed(list('abcd'))): ...
View Question