Files
30-seconds-of-code/test/decapitalize/decapitalize.py
Rohit Tanwar 385bf72a3e readme-script
2018-02-20 22:42:11 +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:])