Create a program that prompts the user for a string and then prints out the string reversed.
USING LOOP
string = input("Enter a string: ")
reversed_string = ""
for char in string:
reversed_string = char + reversed_string
print("Reversed string:", reversed_string)
USING SLICE
string = input("Enter a string: ")
reversed_string = string[::-1]
print("Reversed string:", reversed_string)
GUYS IF YOU HAVE ANY DOUBT. PLEASE LET ME KNOW