0
How to reverse string in python 3
4 Answers
+ 6
a="hello"
print(a[::-1])
tutorial on slicing ,
https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2453/?ref=app
+ 1
Thank you
+ 1
l = "hello"
l2 = l[-1:]
print(l2)
0
Using slice starting from index -1 .You can store it in new variable and return this new variable if you want to use a function