Day13: Getting started with Python ๐

Hey there! I am Sutish I am a Devops engineer, started writing articles on my DevOps and cloud journey. My purpose is to share the concepts that I learn, the projects that I build, and the tasks that I perform regarding DevOps. Hope you all find it useful.
Introduction
Python is a high-level, interpreted programming language known for its readability and simplicity. DevOps engineers looking to build logic and programs to automate tasks in their infrastructure. In this blog post, we'll cover the basics of Python, including its features, installation process, and datatype
What is Python?
Python is a ๐ Open source, general purpose, high-level, and object-oriented programming language. It was created by Guido van Rossum and first released in 1991. Python has gained immense popularity due to its simplicity, readability, and vast ecosystem of libraries and frameworks. Some of the well-known frameworks include Django, TensorFlow, Flask, Pandas, and Keras, making Python a powerful tool for various applications.๐๐ก
How to Install Python?
Python can be easily installed on various operating systems whether it is Windows, MacOS, ubuntu, centos etc. Below are the installation instructions for different platforms
Windows Installation :
Visit the official Python website at python.org
Run the installer and check "Add Python to PATH".
Click "Install Now" to complete the installation
Linux Installation :
sudo apt-get update
sudo apt-get install python3.6

To check the Python version
python3 --version

Different Data Types in Python :
Numeric Types:
int: Integer type, e.g.,
x = 5float: Floating-point type, e.g.,
y = 3.14complex: Complex number type, e.g.,
z = 2 + 3j
Sequence Types:
str: String type for text, e.g.,
text = "Hello, World!"list: List type, an ordered collection, e.g.,
my_list = [1, 2, 3]tuple: Tuple type, an ordered, immutable collection, e.g.,
my_tuple = (1, 2, 3)
Set Types:
- set: Set type, an unordered collection of unique elements, e.g.,
my_set = {1, 2, 3}
- set: Set type, an unordered collection of unique elements, e.g.,
Mapping Type:
- dict: Dictionary type, a collection of key-value pairs, e.g.,
my_dict = {'key': 'value'}
- dict: Dictionary type, a collection of key-value pairs, e.g.,
Boolean Type:
- bool: Boolean type representing
TrueorFalse
- bool: Boolean type representing
None Type:
- NoneType: Represents the absence of a value or a null value, commonly denoted as
None
- NoneType: Represents the absence of a value or a null value, commonly denoted as
Binary Types:
bytes: Immutable sequence of bytes, e.g.,
b = b'hello'bytearray: Mutable sequence of bytes, e.g.,
ba = bytearray([65, 66, 67])
๐ Conclusion :
We covered the basics of Python, including its features, installation process, and an introductory task to check the Python version and explore different data types.
Thank you for reading!
Contact me at :
Linkedin: https://www.linkedin.com/in/sutish-pradhan/
E-mail: psutish@gmail.com




