+1 vote
1 view
in Python by (2.6k points)
edited by
How can I convert a str from uppercase, or half uppercase to lowercase?

E.x. "Decimeter" to "decimeter"

2 Answers

0 votes
by (10.9k points)
edited by

@Krishna, To lowercase a string in Python you can use .lower() function:



Returns: decimeter

For more details take a look here- https://docs.python.org/3/library/stdtypes.html?highlight=str.lower#str.lower

0 votes
by (107k points)

You can use the below-mentioned code:-

>>> s='Километр'

>>> print s.lower()


>>> print s.decode('utf-8').lower()


You can use the following video tutorials to clear all your doubts:-

Related questions

0 votes
1 answer
asked Jul 2, 2019 in Python by Sammy (47.8k points)
0 votes
1 answer
asked Jul 22, 2019 in Python by Sammy (47.8k points)
+1 vote
1 answer
+3 votes
2 answers
Welcome to Intellipaat Community. Get your technical queries answered by top developers !