Day 13 : Basics of Python

Day 13 : Basics of Python

ยท

2 min read

๐Ÿ”ถ What is Python?

  • Python is an Open source, general-purpose, high-level, and object-oriented programming language.

  • It was created by Guido van Rossum

  • Python consists of vast libraries and various frameworks like Django, Tensorflow, Flask, Pandas, Keras etc.

๐Ÿ”ถ How to Install Python?

You can install Python in your System whether it is Windows, MacOS, ubuntu, centos etc. Below are the links for the installation:

๐Ÿ”ถ Task-1: Install Python in your respective OS, and check the version.

sudo apt-get install python3.6
python3 --version

๐Ÿ”ถ Task-2: Read about different Data Types in Python.

  • Numeric data types: int, float, complex

  • String data types: str

  • Sequence types: list, tuple, range

  • Binary types: bytes, bytearray, memoryview

  • Boolean type: bool

  • Set data types: set, frozenset

Numeric data types :

int - It holds signed integers of non-limited length.
float - To returns a floating point number or a decimal point for a provided number.
complex - It is used for representing complex numbers.

String data types:

str - The string type in Python is called str.

Sequence types:

list - To create a list in Python, we use square brackets ( [] ).
tuple - Tuples are used to store multiple items in a single variable.
range - range() returns an immutable sequence of numbers that can be easily converted to lists, tuples, sets etc.

Binary types :

bytes - bytes() returns an object that cannot be modified.
bytearray - It is a mutable sequence of integers in the range between 0 and 255.
memoryview - The memoryview() function allows direct read and write access to an object's byte-oriented data without needing to copy it.

Boolean type:

bool - It represents one of the two values i.e. True or False.

Set data types:

set - Sets are used to store multiple items in a single variable.
frozenset - An immutable version of a Python set object is a frozen set. While parts of a set can be altered at any moment, components of a frozen set cannot be modified after they've been created.

Stay in the loop with my latest insights and articles on cloud โ˜๏ธ and DevOps โ™พ๏ธ by following me on Hashnode, LinkedIn (https://www.linkedin.com/in/chandreshpatle28/), and GitHub (https://github.com/Chandreshpatle28).

Thank you for reading! Your support means the world to me. Let's keep learning, growing, and making a positive impact in the tech world together.

#Git #Python #AWS Devops #Devopscommunity #90daysofdevopschallenge

Did you find this article valuable?

Support Chandresh Patle's Blog by becoming a sponsor. Any amount is appreciated!

ย