Day 15: Basics of Python for DevOps Engineers
Hello, I started my journey as a software tester and later discovered that I am interested in DevOps. So as a transiting of career to DevOps engineer. I am practicing the #100daysofdevops Challenge for self-improvement and learning the process of DevOps. I am sharing my experience with you, you can contact me at vishalabhosale30@gmail.com
What is Python?
Python is an open-source, general-purpose, high-level, and object-oriented programming language created by Guido van Rossum. It has a vast ecosystem of libraries and frameworks, such as Django, TensorFlow, Flask, Pandas, Keras, and many more.
How to Install Python
Windows Installation
Go to the Python website.
Download the latest version of Python.
Run the installer and follow the instructions.
Check the installation by opening a command prompt and typing:
python --version
Ubuntu Installation
sudo apt-get updatesudo apt-get install python
macOS Installation
Download the installer from the Python website.
Follow the installation instructions.
Check the installation by opening a terminal and typing:
python3 --version
Tasks with Answers
Task 1:
- Install Python on your respective OS, and check the version.
Answer:



2. Read about different data types in Python.
Python supports several data types, which can be categorized as follows:
Numeric Types:
int: Integer values
x = 10
float: Floating-point values
y = 10.5
complex: Complex numbers
z = 3 + 5j
Sequence Types:
str: String values
name = "bhavin"
list: Ordered collection of items
fruits = ["apple", "banana", "cherry"]
tuple: Ordered, immutable collection of items
coordinates = (10.0, 20.0)
Mapping Types:
dict: Key-value pairs
person = {"name": "bhavin", "age": 24}
Set Types:
set: Unordered collection of unique items
unique_numbers = {1, 2, 3, 4, 5}
frozenset: Immutable set
frozen_numbers = frozenset([1, 2, 3, 4, 5])
Boolean Type:
bool: Boolean values
is_active = True
None Type:
NoneType: Represents the absence of a value
data = None