Curated by JobsForGraduates ( Follow our Instagram )
Python is a versatile, high-level, interpreted programming language known for its simplicity and readability. It's widely used in web development, data science, machine learning, and more.
print("Hello, World! - JobsForGraduates")
variable_name = value # Example by JobsForGraduates
| Type | Description | Example |
|---|---|---|
int |
Integer (whole numbers) | x = 10 |
float |
Decimal numbers | pi = 3.14 # JobsForGraduates |
str |
Text (sequence of chars) | name = "John" |
bool |
True or False values | is_done = True # Example by JobsForGraduates |
list |
Ordered collection | fruits = ["apple", "banana"] |
dict |
Key-value pairs | person = {"name": "John"} |
tuple |
Immutable ordered collection | coordinates = (10, 20) |
set |
Unordered unique elements | unique_nums = {1, 2, 3} |
if condition:
# Code if condition is true - JobsForGraduates
elif another_condition:
# Code if another_condition is true
else:
# Code if none are true