This has been asked many times but i do not want to ask that again . I just want to know how is this happening ?
>>> st="arindam"
>>> st[::-1] #This is the one that everyone probably uses
'madnira'
Would someone please explain why this works?
>>> st[-1::-1]
'madnira'
How is this also reversing the string successfully? I thought this would start from 'a' and print 'adnira'