10 lines
No EOL
227 B
Python
10 lines
No EOL
227 B
Python
def capitalize_first_letter(s):
|
|
"""Capitalizes the first letter of a string."""
|
|
if not s:
|
|
return s
|
|
return s[0].upper() + s[1:]
|
|
|
|
|
|
def reverse_string(s):
|
|
"""Reverses the given string."""
|
|
return s[::-1] |