Python String

Strings – you use it in every program, just like any other programming language. Learn about Strings in Python and how to manipulate them in the Pythonic way.

Python String split() function

Python string split() functions enable the user to split the list of strings. It’s very useful when we are working with CSV data. String split() function syntax separator: It basically acts as a delimiter and splits the string at the specified separator value. maxsplit: It is a limit up to which the string can be […]

Python String split() function Read More »

Python String isnumeric() Function

Python String isnumeric() function returns True if all the characters in the input string are found to be of numeric type, else it returns False. A numeric character can be of the following type: numeric_character=Decimal numeric_character=Digit numeric_character=Numeric Syntax: isnumeric() arguments: The isnumeric() function dosen’t take any argument as input. Python isnumeric() Examples Example 1: Output:

Python String isnumeric() Function Read More »

Python String endswith() function

Python string endswith() function returns True if the input string ends with a particular suffix, else it returns False. Key Points: Return Type: Boolean i.e. True or False Parametric Values: There are 3 parameters: Suffix, Start, End Parameter Description Suffix It can be a String or Tuple of Strings that are to be checked. It

Python String endswith() function Read More »

Python String upper() Function

Python String upper() function converts complete String into Uppercase and returns a new string. Strings are immutable in String, so the original string value remains unchanged. Key Points : Return Type: String Parametric Values: No parameters can be passed into the upper() function. Converts whole of string into uppercase It does not modify the original string. The

Python String upper() Function Read More »

Python String islower() Function

Python String islower() function checks if all the characters in a string are lowercase then return True else False. Key Points : Return Type: Boolean i.e. True or False Parametric Values: No Parameters required It is not space-sensitive but case sensitive Empty String also returns False. String islower() Syntax str_name here refers to the input

Python String islower() Function Read More »

Python String isupper() Function

String in Python has built-in functions for almost every action to be performed on a string. Python String isupper() function checks if all the characters in a string are uppercase then returns true else false. Key Points : Return Type: Boolean i.e. True or False Parametric Values: No Parameters required It is not space-sensitive but

Python String isupper() Function Read More »

Python String isdigit() Function

Python String isdigit() function checks for the Digit characters in a string and returns True if the string consists of only digit characters. Key Points: Return Type: Boolean i.e. True or False Parametric Values: No parameters need to be parsed in isdigit() function Blank spaces in between digits lead to return False Empty String also returns False

Python String isdigit() Function Read More »

Python String isalpha() Function

String in Python has built-in functions for almost every action to be performed on a string. Python String isalpha() function checks for the alphabets in a string and returns True if the string consists of only alphabets (a-z, A-Z). Key Points : Return Type: Boolean i.e. True or False Parametric Values: No Parameters required Blank

Python String isalpha() Function Read More »

Python String isalnum() Function

String in Python has built-in functions for almost every action to be performed on a string. Python String isalnum() function checks for the alphanumeric characters in a string and returns True only if the string consists of alphanumeric characters i.e. either alphabet (a-z, A-Z) or numbers (0-9) or combination of both. Key Points : Return

Python String isalnum() Function Read More »