I Haz Codes

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Menu
Reverse a string

Enter the code into a new file and save it. Make sure it has .py at the end of the file name.

The code below will reverse a string (write the word backwards). However it is not complete.

Replace the ???? with the correct code.

word = input("Enter a word")
pos = ????
while pos >= ????:
	print(word[pos])
	pos = pos ? 1


You need to log in or create an account to submit code!

Comments are closed.

Information