Files
30-seconds-of-code/test/decapitalize/decapitalize.py
2018-02-16 16:09:18 +05:30

2 lines
117 B
Python

def decapitalize(string, upper_rest=False):
return str[:1].lower() + (str[1:].upper() if upper_rest else str[1:])