Python String Swapcase()

Python String swapcase()

Python string swapcase() method is a built-in function that converts all uppercase characters into lowercase and all lowercase characters into uppercase characters of a given string and returns a new…
View Post
Python String Isspace()

Python String isspace()

Python string isspace() method is a built-in function that returns True if all the characters in a string are whitespace characters. Otherwise, it returns false. What are whitespace characters in…
View Post
Python String Isalnum()

Python String isalnum()

Python string isalnum() method is a built-in function that returns True if all the characters in a string are alphanumeric. Otherwise, it returns false. Example of characters that are not…
View Post
Python String Rjust().Png

Python String rjust()

Python string rjust() method is a built-in function that will right align the string using a specified character as the fill character. The default character is space if no argument…
View Post
Python String Ljust()

Python String ljust()

Python string ljust() method is a built-in function that will left align the string using a specified character as the fill character. The default character is space if no argument…
View Post
Python String Upper()

Python String upper()

Python String upper() method is a built-in function that converts all the lowercase characters into uppercase and returns it. Syntax The syntax of upper() method is: string.upper() Parameter The upper()…
View Post
Python String Islower()

Python String islower()

Python String islower() method is a built-in function that returns True if all the characters in the string are lowercase. If the string contains at least one uppercase character, the…
View Post
Python String Isupper()

Python String isupper()

Python String isupper() method is a built-in function that returns True if all the characters in the string are uppercase. If the string contains at least one lowercase character, the…
View Post
Python String Endswith()

Python String endswith()

Python String endswith() method is a built-in function that determines whether the given string ends with a specific sequence of characters. Let’s take a look at syntax and examples of…
View Post
Python String Count()

Python String count()

Python String count() method is a built-in function that returns the number of occurrences of a substring in the given string. Syntax The syntax of count() method is: string.count(substring, start=…, end=…) Parameter…
View Post
Python String Center()

Python String center()

Python String center() method is a built-in function used to align the string to the center by filling the paddings to the left and right of the string with a specified fillchar(default…
View Post
Python String Casefold()

Python String casefold()

Python String casefold() method is used to implement caseless string matching. Case folding is similar to lowercasing but more aggressive because the casefold() function is more aggressive as it converts all string…
View Post
Python Remove Newline From String

Python Remove Newline From String

There are times where we need to remove the newline from string while processing massive data. This tutorial will learn different approaches to strip newline characters from string in Python.…
View Post
Python Split List Into Chunks

Python Split list into chunks

In this tutorial, you will learn how to split a list into chunks in Python using different ways with examples. Python Split list into chunks Lists are mutable and heterogenous,…
View Post
Python Comment Block / Python Multiline Comment

Python Comment Block

Comments are a piece of text in a computer program that provides more information on the source code written. Like every other programming language, Python has three different types of…
View Post
Python Ternary Operator

Python Ternary Operator

Python Ternary operators also called conditional expressions, are operators that evaluate something based on a binary condition. Ternary operators provide a shorthand way to write conditional statements, which makes the…
View Post
Python String Lower()

Python String lower()

Python String lower() method converts all the uppercase characters in a string to lowercase characters and returns the string as output. lower() Syntax The Syntax of lower() method is: string.lower() lower() Parameters…
View Post