0

how to upper or lower specified substring??

how to upper or lower specified substring in python with upper() or lower()??

25th Sep 2018, 8:39 AM
Hamid Reza Imany Khoshkhoo
Hamid Reza Imany Khoshkhoo - avatar
3 Answers
+ 1
s= "HELLO python" print( s[:5].lower() ) print( s[6:].upper() )
25th Sep 2018, 9:02 AM
KrOW
KrOW - avatar
+ 1
this mean that every string have a method called upper() for get itself to uppercase, and a method lower() to return itself to lowercase
25th Sep 2018, 9:50 AM
KrOW
KrOW - avatar
0
is that means i cant put any arguments upper("here") ??? like split()
25th Sep 2018, 9:30 AM
Hamid Reza Imany Khoshkhoo
Hamid Reza Imany Khoshkhoo - avatar