What will be the output of the following Python code?
for i in range(int(2.0)): print(i)
निम्नलिखित Python कोड का आउटपुट क्या होगा?
What will be the output of the following Python code snippet?
for i in [1, 2, 3, 4][::-1]: print (i)
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
for i in ''.join(reversed(list('abcd'))): print (i)
for i in 'abcd'[::-1]: print (i)
x = 2 for i in range(x): x += 1 print (x)
निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?
x = 2 for i in range(x): x -= 2 print (x)
for i in range(10): if i == 5: break else: print(i) else: print("Here")
for i in range(5): if i == 5: break else: print(i) else: print("Here")
x = (i for i in range(3)) for i in x: print(i)
string = "my name is x" for i in string: print (i, end=", ")
string = "my name is x" for i in string.split(): print (i, end=", ")
a = [0, 1, 2, 3] for a[-1] in a: print(a[-1])
a = [0, 1, 2, 3] for a[0] in a: print(a[0])
What will be the output of the following Python statement?
>>>"a"+"bc"
>>>"abcd"[2:]
>>>print('new' 'line')
निम्नलिखित Python स्टेटमेंट का आउटपुट क्या होगा?
>>>str1="helloworld"
>>>str1[::-1]
>>>example = "snow world"
>>>example[3] = 's'
>>>print example