+ 1

Python question

I've been looking through the challenges for Python and many of them ask you to take a string and reverse its letters. How is this done? Any other similar functions as well (ie putting things in alphabetical order)? Edit: Thanks for answering!

23rd Aug 2020, 11:51 PM
Wounded Eagle
Wounded Eagle - avatar
2 Respostas
+ 11
Wounded Eagle by using [::-1] we can reverse the letters in the string https://code.sololearn.com/cX8HwvEVhS05/?ref=app for sorting items, you can use python build in function sort() https://www.w3schools.com/python/trypython.asp?filename=demo_ref_list_sort Hope this helpful! Programming is fun! 🤗😄
24th Aug 2020, 12:01 AM
WenHao1223
WenHao1223 - avatar