The method isupper() checks whether all the case-based characters (letters) of the string are uppercase. [Read more…] about Python String isupper() Method
If all the characters in the string are decimal, the Python isdecimal() method returns True. Decimal characters are the characters of base 10. If not, False returns.
[Read more…] about Python String isdecimal() Method
The method isdigit() returns True if all the characters are digits. It returns False if not.
[Read more…] about Python String isdigit() Method
The method isnumeric() checks whether the string consists of only numeric characters. This method is present only on unicode objects.
[Read more…] about Python String isnumeric() Method
Python isspace() is a built-in method returns true if there are only whitespace characters in the string. Otherwise, it returns false. Space, newline, tabs, etc., are known as whitespace characters and defined in the Unicode character database as Other or Separator.
[Read more…] about Python String isspace() Method
Python ljust() method returns a left-justified string and fills the remaining spaces with specified fillchar (default is a space). This method returns a new left-justified string and is filled with fillchars. The original string is returned if the width is less than len(s).
[Read more…] about Python String ljust() Method
The Python center() method aligns the string center with the string’s left and right padding. This function takes two parameters, the first is the width, and the second is an optional fillchar. The fillchar is a character used for padding the string to the left and right. [Read more…] about Python String center() Method
It determines if string str occurs in string or in a substring of string if starting index beg and ending index end are given. This method is same as find(), but raises an exception if sub is not found.
[Read more…] about Python String index() Method
The method splitlines() returns a list with all the lines in string, optionally including the line breaks (if num is supplied and is true) [Read more…] about Python String splitlines() Method
The join() method is used to join separator items to the input string. It accepts as parameters iterables such as collection, list, tuple, string, etc., and another string.
The join() function returns a string that joins the iterable elements to the separator string passed on to the function as an argument. [Read more…] about Python String join() Method
Python String expandtabs() Method returns a copy of the string in which tab characters ie. ‘\t’ are expanded using spaces, optionally using the given tabsize (default 8). [Read more…] about Python String expandtabs() Method
The encode() method returns an encoded string. Strings preserved as Unicode after Python 3.0. python encode utf-8 use if no encoding is defined. [Read more…] about Python’s encode and decode Methods
Python min() function is used to get the min alphabetical character from the string. The Python max() function returns the max alphabetical character from the string. It can also use to find the most considerable item between two or more parameters.
[Read more…] about Python String Min and Max Methods
Python string maketrans() method returns a mapping table that maps every character in the intab string in the same place in the outtab string. This table is then moved to the translate() function. [Read more…] about Python String maketrans() Method
The Python translate() method returns a copy of the string in which a specified translation table is used to map each character. We may use the maketrans() method to construct a chart of translation in various formats from character to character mappings.
[Read more…] about Python String translate() Method
Data Structures in Python describe how data should organize and stored efficiently to solve a computational problem while making their storage (space) complexity and time complexity as optimized as possible. Let us go through the topics we will cover in Data Structures in Python. [Read more…] about Data Structures in Python