We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2a78d4 commit 1436b58Copy full SHA for 1436b58
strings/reverse_string.py
@@ -0,0 +1,15 @@
1
+"""
2
+A simple program to reverse a string.
3
+
4
+Author: Eric Butler Jr.
5
+Date: 2025-10-28
6
7
8
+def reverse_string(s: str) -> str:
9
+ """Return the reverse of the given string."""
10
+ return s[::-1]
11
12
13
+if __name__ == "__main__":
14
+ text = input("Enter a string: ")
15
+ print("Reversed string:", reverse_string(text))
0 commit comments