The quiz where the difficulty automagically adapts to the player's Python knowledge
This is a question page. You can use this page to bookmark a question. Start a new quiz!
Question #475
The [::] syntax depicts extended slicing in Python. [::-1] returns a reversed string. (w3schools.com/python/python_howto_reverse_string.asp)
Which syntax allows to print a string backwards?
— The Python Quiz (@thepythonquiz) February 7, 2021
print("Hello World"[:-1])
print("Hello World"[:1])
print("Hello World"[::-1])
print("Hello World"[::1])
print("Hello World"[0:-1])
π Comment the answer, like and retweet! #python
Question difficulty: π΅π΅π΅π΅π΅
Similar questions: