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 #99
"python"[::-2]
The slice notation step goes as per the following: a[start:stop:step]. Here, the slide start at -0 (before "p") and stops at the end (after "n"). As the step is -2, the slice is read backwards, every 2 elements; "n", "h" and "y". (thepythonquiz.com/admin/quiz/question/97/change)
What is the output of the code snippet below?
— The Python Quiz (@thepythonquiz) April 21, 2020
"python"[::-2]
oht
tho
th
otp
nhy#python #pythonprogramming #learnpython
Question difficulty: π΅π΅π΅π΅π΅
Similar questions: