0
Can you explain me this?
str = "data structure" print(str[-11:-3:3]) # Output: 'atc'
1 Answer
+ 8
-11 is the 11th character from the back, -3 is the 3rd character from the back. 3 is the step-size.
Compare to the range() function
str = "data structure" print(str[-11:-3:3]) # Output: 'atc'