Pankaj Kumar

Pankaj Kumar

I have been working on Python programming for more than 12 years. At AskPython, I share my learning on Python with other fellow developers.
lower function in Python: Use str.lower()

Python String islower() Function

Working with letter case in Python can mean changing text or checking how it is already cased. The str.lower() method returns a lowercase copy of a string, while islower() reports whether its cased characters are lowercase. I’ll show how to…

Python isdigit: Check Unicode Digits in Strings

Python isdigit: Check Unicode Digits in Strings

Checking whether a string contains digit characters is different from checking whether Python can parse it as an integer. Python’s str.isdigit() method tests whether every character in a non-empty string is a qualifying Unicode digit. I’ll show how to use…

Python String Capitalize: Method and Examples

Python String Capitalize: Method and Examples

Capitalizing a Python string can mean changing its first character, each word, or every cased letter. The capitalize() method titlecases the first character and lowercases the remainder. You’ll see what capitalize() returns for empty and punctuation-first strings, then compare methods…