+ 1

I NEED HELP.....Can someone tell me how to write a code In python that reverses a sting eg:'WAP' TO 'PAW'

8th Aug 2020, 11:56 PM
santagotthejuice
santagotthejuice - avatar
5 Antworten
+ 2
treat the string like a list. [start:stop:step] a negative step means it will cycle though backwards. s = "hello" print(s[::-1]) output: olleh https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2453/
9th Aug 2020, 12:05 AM
Randomocity
Randomocity - avatar
+ 1
Thanks 👍Randomocity
9th Aug 2020, 12:19 AM
santagotthejuice
santagotthejuice - avatar
0
happy to help 😊
9th Aug 2020, 12:27 AM
Randomocity
Randomocity - avatar
0
But it's still giving me some problems Randomocity
9th Aug 2020, 12:28 AM
santagotthejuice
santagotthejuice - avatar
- 1
Randomocity Go check out my latest post , I've linked the problem...... try to solve it
9th Aug 2020, 12:29 AM
santagotthejuice
santagotthejuice - avatar