Posts From Python String

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 encode() and decode() Functions

Python’s encode and decode methods are used to encode and decode the input string, using a given encoding. Let us look at these two functions in detail in this article. Encode a given String We use the encode() method on the input string, which every string object has. Format: This encodes input_string using encoding, where […]

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 isCase Sensitive […]

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 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 string. And, […]

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 case sensitive […]