I have a script which reads the input and than lists it, however i want it to convert upper case letters to lower case, how can i do that?
this is what i got
for words in text.readlines(): sentence = [w.strip(',.') for w in line.split() if w.strip(',.')] list.append(sentence)
To use a keyboard shortcut to change between lowercase, UPPERCASE, and Capitalize Each Word, select the text and press SHIFT + F3 until the case you want is applied.
Bonus Tip: Microsoft word also has a keyboard shortcut! Highlight the text you wish to modify then while holding down the Shift key tap the F3 key (tap it again to cycle through CAPITAL, lower case and Sentence case). It's that simple!
Unlike Microsoft Word, Microsoft Excel doesn't have a Change Case button for changing capitalization. However, you can use the UPPER, LOWER, or PROPER functions to automatically change the case of existing text to uppercase, lowercase, or proper case.
You can find more methods and functions related to Python strings in section 5.6.1. String Methods of the documentation.
w.strip(',.').lower()
str.lower()
converts all cased characters to lowercase.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With