original_string = "Python"
reversed_string = original_string[::-1]
print(f"Original String: {original_string}\nReversed String: {reversed_string}")Output:
Original String: Python
Reversed String: nohtyP
original_string = "Python"
reversed_string = original_string[::-1]
print(f"Original String: {original_string}\nReversed String: {reversed_string}")Output:
Original String: Python
Reversed String: nohtyP