0
Extra-Terrestrials Challenge Alternate Solution
For the above challenge (take a given word and output the word in reverse order), I came up with: word = input() alien_word = "" g = -1 for i in range(len(word)): alien_word = alien_word + word[g] g -= 1 print(alien_word) END Does anyone have another solution or is there a simpler one? I would like to explore other ways of solving the same problem and obviously, simple is better so I would like to know if there is a better way. Thanks.
2 odpowiedzi
+ 1
~ swim ~ thanks