Skip to content

Commit 45d04d3

Browse files
Update reverse-string.md
Added type hints
1 parent bb34347 commit 45d04d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

snippets/python/string-manipulation/reverse-string.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ tags: string,reverse
66
---
77

88
```py
9-
def reverse_string(s):
10-
return s[::-1]
9+
def reverse_string(s:str) -> str:
10+
return s[::-1]
1111

1212
# Usage:
1313
reverse_string('hello') # Returns: 'olleh'

0 commit comments

Comments
 (0)