In Python, I know I can reverse strings doing
'dfdfsdf'[::-1]
and that essentially makes it step backwards. However when I try to run this it won't work
string = 'dfdfsdf'
reversed = string[0:len(string):-1]
print(reversed)
I was just wondering doing this doesn't work; the format is [first:last:step], so I thought I could.