Sets in Python

Sets in Python

A set in Python is a unique data structure based on the mathematical concept of a set. It does not follow any order or index. Elements in a set are written inside curly braces. # This program is an example of set in python...
Tuples in Python

Tuples in Python

Similar to lists, tuples are an important data type in Python. Tuples follow a specific order; however, unlike lists, their elements cannot be changed. The elements in a tuple are separated by commas and enclosed in parentheses. # This program is an example of tuple...
List in Python

List in Python

Lists are a widely used data type in Python. In most programming languages, they are known as arrays. They follow a specific order and can be modified. In Python, list values are separated by commas and enclosed in square brackets. # This program is an example of list...
String in Python

String in Python

Strings have already been discussed in the Data Types section; But the prevalence of strings is so high that it is necessary to make a separate post. So here we will discuss Python strings and its built-in functions in detail. In last blog post we showed just...
Python data types

Python data types

In previous post we have seen about variables and operators in Python. If you notice, you may notice that the variables are different here, even though we have been dealing with numeric values so far. But in order to work normally, we have to work with different types...