Smart Tech
Wednesday, June 10, 2015
Reverse a string - Python
st = "awesome!"
st1 = ''
ls = len(st)
for x in range(len(st)):
st1 = st1 + st[ls - 1- x]
print st1
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment