Python Archive

Python not equal operator

In this post, we will see about Python not equal operator. Not equal operator is denoted by in Python and returns true when two variables are of same type but have different value. If …

Python add to Dictionary

In python, there are multiple ways to add keys or values to dictionary. You can use assignment operator to add key to dictionary. # Updates if ‘x’ exists, else adds ‘x’ dic=1 There are other …

Python String compare

In this post, we will see how to compare two Strings in Python. You don’t any specific methods to compare Strings in python. You can use different operators such == and =! for String comparison. …

Validate email address in Python

In this post, we will see how to validate email address in Python. There are times when you want to validate email address. You can write your own code to validate email address but there …

Remove whitespace from String Python

In this post, we will see how to remove whitespace from String in Python. There are multiple ways to do it. Remove all whitespace from String You can use String’s replace method to remove all …

Python Remove Character from String

In this post, we will see how to remove character from String in Python. There are multiple ways to do it.We will see three of them over here. Using String’s replace method You can use …

Convert string to list python

In this post, we will see how to convert String to list in Python. We can use String’s split function to convert String to list. String’s function Python String split function signature Parameters …

Remove from list Python

In this post, we will see how to remove an element from list in python. You can remove elements from list in 3 ways. Using list object’s remove method Here you need to specify element …