Convert strings to lower and uppercase in Python


Convert string to lowercase:

string = "Snake"
print(string.lower())
snake

Convert string to uppercase:

string = "BigSnake"
print(string.upper())
BIGSNAKE


Ace your next data science interview

Get better at data science interviews by solving a few questions per week



Find a bug? Submit a suggested change on Github, or message me on Twitter.