Skip to content

Instantly share code, notes, and snippets.

@vishal2612200
Created April 9, 2020 15:38
Show Gist options
  • Save vishal2612200/4c58a1e796f6acfc65613a9011a34cb1 to your computer and use it in GitHub Desktop.
Save vishal2612200/4c58a1e796f6acfc65613a9011a34cb1 to your computer and use it in GitHub Desktop.
program to convert strings of all uppercase characters into strings of all lowercase characters using the map() function ( Freshlybuilt blog Gist)
def to_lower(str):
return str.lower()
s = "Welcome To Freshlybuilt"
fresh_list = s.split() # convert string into list
fresh_list = list(map(to_lower,fresh_list)) #convert elements into lowercase
fresh_list = ' '.join(map(str, fresh_list)) # convert list into string
print(" String in lower case: ", fresh_list)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment