Python Archive

Python create empty set

In this post, we will see how to create an set in python. Set is collection which contains unique elements.You can simply use to create empty set in Python. Let’s see this with the …

Python list to tuple

In this tutorial, we will see how to convert list to tuple. Using tuple function You can use python tuple() function to convert list to tuole.It is simplest way to convert list to tuple. Let’s …

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. …