Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

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]:
print (i)
a) a b c d
b) d c b a
c) error
d) none of the mentioned

Answer: b
Explanation: [::-1] reverses the string.

Join The Discussion