Useful Functions: String Functions | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Useful Functions: String Functions

If I have to change only a certain part of the string to uppercase letters. How will I do it? I tried making only 'hi' to HI using upper() in 'hi sololearn' but couldn't get the right code. ============================== In [45]: x = 'hi sololearn' In [46]: print(x.upper()) HI SOLOLEARN In [47]: print(x[0].upper(),x[1].upper()) H I =================================

7th Apr 2017, 7:08 AM
deepak deo
deepak deo - avatar
1 Answer
7th Apr 2017, 12:03 PM
Tob
Tob - avatar