Question #97

What is the output of the code snippet below?
"python"[-2:1:-1]

The slice notation step goes as per the following: a[start:stop:step]. Here, the slide start at -2 (before "t"), stops as -1 (before "n") as the step is -1. (stackoverflow.com/questions/509211/understanding-slice-no...)


Comment on Disqus:

Comment on Twitter:

Question difficulty: 🔵🔵🔵🔵🔵


Similar questions: