Hello Dosto! ๐ Today, let's dive into the world of Python โ a powerhouse for building logic and programs in the DevOps.
๐ค What is Python?
An open-source, general-purpose, high-level, and object-oriented programming language. Created by the maestro Guido van Rossum, Python offers vast libraries and frameworks like Django, TensorFlow, Flask, Pandas, and Keras.
๐ How to Install Python?
Whether you're on Windows, MacOS, Ubuntu, CentOS, or any system, Python has got you covered. Check out the installation links and start exploring!
๐ Task 1:
Install Python in your OS:
For Windows:
Visit the official Python website: Python Downloads.
Download the latest version for Windows.
Run the installer and make sure to check the box that says "Add Python to PATH" during installation.
Click "Install Now" to start the installation.
For Ubuntu:
Open a terminal.
Run the following commands:
sudo apt update sudo apt install python3
Check the version.
command:
python --version
Dive into different Python Data Types.
Numeric Types:
int: Integer type (e.g., 5, -10).
float: Floating-point type (e.g., 3.14, -0.5).
Sequence Types:
str: String type (e.g., "Hello, Python!").
list: Ordered collection of items.
tuple: Ordered, immutable collection.
Mapping Type:
- dict: Key-value pairs (e.g., {'name': 'John', 'age': 25}).
Boolean Type:
- bool: True or False.
Set Types:
- set: Unordered collection of unique items.
None Type:
- None: Represents the absence of a value or a null value.
Explore these types by creating variables, performing operations, and understanding their characteristics.