VINAYA KUMAR Interview Question

Question: How can you reverse a string in Python?

Interview Answer

Anonymous

Mar 22, 2024

my_string = "hello" reversed_string = my_string[::-1] print(reversed_string) # Output: "olleh"