I am having a problem in understanding what happens when i put negative value to step in case of slicing.
I know [::-1]
reverses a string. i want to know what value it assign to start and stop to get a reverse.
i thought it would be 0 to end to string. and tried
f="foobar"
f[0:5:-1]--->
it gives me no output. why?
and i have read start should not pass stop. is that true in case of negative step value also?
can anyone help me to clear my doubt.