Pregunta de entrevista de MemoryBlue

Write a function to reverse a string.

Respuesta de la entrevista

Anónimo

30 jul 2024

def reverse_string(s: str) -> str: return s[::-1] # Example usage print(reverse_string("hello")) # Output: "olleh"