You can download this code by clicking the button below.
This code is now available for download.
Converts the input string to uppercase or lowercase.
Technology Stack : String methods
Code Type : String operation
Code Difficulty :
def format_string(string, upper=False):
if upper:
return string.upper()
else:
return string.lower()