Question #842

What is the output of the code snippet below?
print(reversed("hello") == "olleh")

The reversed() function returns an iterator, not a string. reversed("hello") is not equal to "olleh" . (programiz.com/python-programming/methods/built-in/reversed)


Comment on Disqus:

Question difficulty: 🔵🔵🔵🔵🔵


Similar questions: