+ 1
I need to take an word(string) as an input and print the word backwards
Eg:input:bad Output:dab This is the code I've written x=str(input("Enter a word :")) print(x) i=len(x)-1 for i in range(len(x)): print(x[i]) i-=1 Is my logic correct because I'm not getting the output
4 Antworten
+ 2
Could you give me an up vote.... just asking
+ 1
I think this code will reverse the order of words in a sentence rather than printing the word backwards
0
Thank you for you're help