This repository contains my Python learning journey.
I am currently learning Python from the basics and practicing different concepts through simple programs and examples.
- Variables
- Comments
- Output (
print()) - Data Types
- Numbers
- Casting
- Operators
- Strings
- String Slicing
- Lists
- Boolean
Variables are used to store values.
name = "Sachin"
age = 21Here:
nameis a variableageis a variable
Python has different built-in data types such as:
int
float
str
bool
list
tuple
set
dictExample:
x = 10
print(type(x))Output:
<class 'int'>
A list is used to store multiple items in a single variable.
thislist = ["apple", "banana", "cherry"]
print(thislist)Here:
thislist→ variable["apple", "banana", "cherry"]→ list objectlist→ data type
We can check the data type using type():
print(type(thislist))Output:
<class 'list'>
type() is a built-in Python function used to check the data type of an object.
Example:
x = 10
print(type(x))Output:
<class 'int'>
Another example:
x = ["apple", "banana"]
print(type(x))Output:
<class 'list'>
| File | Topic |
|---|---|
first.py |
First Python programs |
Variables.py |
Variables |
Data_Types.py |
Data types |
Numbers.py |
Numbers |
Casting.py |
Type casting |
Operators.py |
Operators |
Strings.py |
Strings |
Slicing_string.py |
String slicing |
lists.py |
Lists |
Boolean.py |
Boolean |
Output.py |
Output |
comment.py |
Comments |
pswdviewer.py |
Practice program |
My goal is to learn Python step by step, understand the fundamentals clearly, and gradually move toward more advanced Python programming.
Learning by coding, practicing, and understanding one concept at a time. 🚀
Status: 🟢 Currently Learning Python Basics