I need to create a program that allows the user to enter a line, and then, using a range, the program displays the same line back. I introduced this in python, but in my fourth line this is an error. 'int' object has no attribute '__getitem__'. Can someone please help me fix this? (Using range)
user=raw_input("Please enter a string: ")
user1=len(user)-1
for user in range(user1,-1,-1):
user2=user[user1]
print user2
user4139413
source
share