Question #98

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

The slice notation step goes as per the following: a[start:stop:step]. Here, the slide start at -4 (at "t"), stops at 0 (at "p"). As the step is -2, only "t" is kept. (stackoverflow.com/questions/509211/understanding-slice-no...)


Comment on Disqus:

Comment on Twitter:

Question difficulty: 🔵🔵🔵🔵🔵


Similar questions: