Robotics & Artificial Intelligence
Write a Python program to reverse a string.
Python String Manipulation
1 Like
Answer
string1 = input("Enter a string: ")
rev = string1[::-1]
print("Reversed string is:", rev)Output
Enter a string: education
Reversed string is: noitacude
Answered By
2 Likes
Related Questions
Write a Python program for the following task:
Take a string entered by the user and check if it begins with the letter "a" or not. If it begins with "a", the user is prompted that it is the first name on the list. If it does not begin with "a", the user is prompted that the string does not begin with the letter "a".
Write a Python program to check that a given string is a palindrome or not.
Take a string and create a substring that contains all the unique characters from the list.
Write a function to check the complexity of a password string. A strong password should contain at least 8 characters, including uppercase letters, lowercase letters and digits.