Online Programming Tutorials | Web Tutorials | PHP Tutorials

Python String rstrip() Method

Python rstrip() method is used to get a copy of the string from which all trailing characters or white spaces on the right side of the string have been removed. By default, it removes white spaces. Read More

Python String lstrip() method

Python lstrip() method is used to get a copy of the string from which all leading characters or white spaces on the left side of the string have been removed. By default, it removes white spaces. Read More

Python IDLE IDE

IDLE(Integrated Development and Learning Environment) is an integrated development environment made for python. It is an IDE for python for writing code. There are a lot of other IDEs you can use, but IDLE is very basic and contains only the essential and basic elements you need in an IDE, making it the right choice for people new to programming. Read More

Python String upper() Method

Python String upper() method takes a string object and converts each of its characters to their corresponding uppercase characters. The string remains unaffected if all the characters in it are already in uppercase. The upper() method works with Unicode characters, unlike the lower() method, which works on ASCII characters. Read More

Python String lower() Method

The Python string lower() method converts each character of the subject string to their corresponding lowercase characters. The lower() method converts the Unicode characters in the string while the lower() method works on the ASCII character. Read More

Python String index() Method

The Python string index() method can search a given string object's substring. It returns the index number or position of the substring(occurs first) in the given string. It raises a ValueError If the substring does not exist in the subject string. Read More

Python String encode() Method

The Python string encode() method encodes the subject string with a provided encoding method as an argument. If no method is not provided, the UTF-8 is used as the default encoding. Read More

Python String endswith() Method

The endswith() method is used when checking whether a substring is equal to the suffix of the string. This method takes a string that will be compared against the suffix of the other string. This method can take two additional arguments. One is the start, and the other is the end. These specify the starting and ending index of the suffix, of which the method will compare the substring. Read More

Python String expandtabs() Method

Expands tabs in a string by replacing the tab with the number of spaces specified by tab size. The function defaults to 8 spaces per tab when tab size isn't provided. This method converts all the tab characters(\t) with whitespaces. The number of whitespaces used depends upon the value of the argument tab size. The number of whitespaces to be used is the difference between the current position and the next stopping position(a multiple of tab size). Read More

Python String casefold() Method

The Python casefold() function works as a stronger version of Python’s lower() function, i.e. it has the same functionality of returning a lowercased copy of the given string, but it takes the method one step further by being more aggressive, which is shown by its lowercasing of character beyond the ASCII accepted characters. It even ignores the case of the given string, making it preferable to handle caseless string matching. Read More

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies Find out more here