12 lines
288 B
Python
12 lines
288 B
Python
def reverse_string(s: str) -> str:
|
|
"""Return the reverse of the input string."""
|
|
return s[::-1]
|
|
|
|
if __name__ == "__main__":
|
|
import sys
|
|
if len(sys.argv) > 1:
|
|
input_str = sys.argv[1]
|
|
else:
|
|
input_str = "Hello, World!"
|
|
print(reverse_string(input_str))
|