Basics of Python for Devops Engineer
What is Python?
Python is a 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.
Installing Python and Checking Version:
On Linux (Ubuntu):
Open a terminal.
Run the following command to install Python:
sudo apt update sudo apt install python3
To check the installed version, run:
python3 --version
On macOS:
Open a terminal.
You may already have Python installed. To check the version, run:
python3 --version
On Windows:
Download the Python installer from the official Python website: Python Downloads.
Run the installer and follow the prompts to install Python.
After installation, open Command Prompt.
To check the installed version, run:
python --version
Python supports several built-in data types :
Numeric Types:
int
: Integer numbers (e.g., 5, -10).float
: Floating-point numbers (e.g., 3.14, -0.001).
Sequence Types:
str
: Strings (e.g., "hello", 'world').list
: Ordered collections of items (e.g., [1, 2, 3]).tuple
: Immutable ordered collections (e.g., (1, 2, 3)).
Mapping Types:
dict
: Key-value pairs (e.g., {'name': 'John', 'age': 30}).
Set Types:
set
: Unordered collections of unique items (e.g., {1, 2, 3}).
Boolean Type:
bool
: Represents True or False.
Conclusion:
In this brief blog post, we covered Python's built-in data types and the installation process. Python offers a variety of data types, including numeric, sequence, mapping, set, boolean, and None types, providing versatility for data manipulation. Additionally, we provided quick installation instructions for Linux, macOS, and Windows. Python's simplicity and rich features make it an indispensable tool for programmers at all levels, empowering them to tackle diverse coding tasks with ease and efficiency.
Happy Learning, Ruko Mat Phod do๐
Subscribe to my newsletter
Read articles from Aryan Kale directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Aryan Kale
Aryan Kale
Hi, I am Aryan Kale, a Java Backend Developer, passionate about developing production-ready applications while building and working with teams of Software Developers, aspiring to become a Technical Architect.After developing Applications in a product based startup and a mid-size service-based firm, I gained experience in Java, Python, SQL, DevOps, Docker, AWS, Leadership Skills, and Soft skills.Getting the responsibility of working with a team of enthusiastic software developers was one of the biggest achievements which improved my communication skills.I believe continuous learning and development to keep myself up to date and up-skilled is the solution to the modern-day application development for customers. Reach out to get modern-day solution for your dream project. Thank You...