Ask the user to enter a string . Compare each element of the string. Use indexing to compare strings.In python and c++ indexing start with 0.To see more about index go to the theory section of python.
enter a string :chiich You Entered : chiich Your reverse string is : hciihc Word at index 0 is not same Word at index 1 is not same Word i is same Word index number is 2 Word i is same Word index number is 3 Word at index 4 is not same Word at index 5 is not same
0 Comments
If you have any doubt and suggestion Please let me know