A Recap of Python

Aarav Iyer
2 min readDec 18, 2023

--

Hello readers! I am posting on Python after a long time and have decided to use this post as a recap of some important topics of Python.

Let’s begin-

1. Data Types

Data types are basically the type of data that can be stored in a variable. Python supports quite a few data types. The main data types supported by Python are-

a. Integer, (int):

The int data type stores an integer. For example;

a=26
print(type(a))

The output will show-

<class 'int'>

b. Floating point, (float):

The float data type stores a decimal number. For example;

b=14.98
print(type(b))

The output will be-

<class 'float'>

You can read more about numbers in Python here.

c. Text, (str):

The str data type stores text. For example;

c='Hello'
print(type(a))

The output will be returned as-

<class 'str'>

d. List, (list):

The list data type stores a list of strings or numbers. For example;

List=[1, 2.6, -45, 'Hello']
print(type(List))

The output:

<class 'list'>

You can find out more about lists in my two-part series here-
1. Python Lists Part-1
2. Python Lists Part-2

You can read more about data types in Python here and find in detail about Tuples in Python here.

That is all for now, but stay tuned for my future posts related to Python! Please give this blog a follow if you like the content and please drop a comment down below, expressing you views, doubts or suggestions regarding any topic.

Read the original post on my blog here alog with many other posts on Python, Binary Code and C++ at https://pycodingguide.blogspot.com!

Happy Coding,

Aarav Iyer

--

--

Aarav Iyer
Aarav Iyer

Written by Aarav Iyer

A tech enthusiast learning Python and interested in anything related to space and the Universe.

Responses (1)