U
Uncle Ben
I found this in one of the online cookbooks:
#Raghunath Reddy Peesari 6 years, 3 months ago # | flag
#There is more simple way. ###
a = 'abcdefghi'
a = a[::-1]
print a
As a newbie Pythoner, I understand [] -1]
but would some tell me how '::' does its magic?
Uncle Ben
#Raghunath Reddy Peesari 6 years, 3 months ago # | flag
#There is more simple way. ###
a = 'abcdefghi'
a = a[::-1]
print a
As a newbie Pythoner, I understand [] -1]
but would some tell me how '::' does its magic?
Uncle Ben