Skip to content

Repository files navigation

python-basic

🐍 Learn Python: Beginner to Intermediate

Welcome to the Learn Python repository! This project is a hands-on, example-driven guide designed to help beginners learn Python from the ground up.

🚀 Start coding. Start learning. One folder at a time.


📚 Topics Covered

#TopicDescription
01Hello WorldYour first Python program
02Variables and Data TypesStrings, numbers, booleans, and more
03Conditionalsif, elif, else
04Loopsfor and while loops
05FunctionsDefining and calling functions
06Lists & TuplesCollections in Python
07Dictionaries & SetsKey-value pairs and unique elements
08String OperationsManipulating text
09Exception HandlingTry/except blocks
10File I/OReading from and writing to files
11Modules & PackagesOrganizing code into reusable modules
12OOP BasicsClasses, objects, inheritance
13List ComprehensionsOne-liners for list generation
14Lambda & Higher-Order Funcslambda, map, filter, reduce
15DecoratorsFunction wrappers
16JSON HandlingReading and writing JSON
17HTTP RequestsCalling REST APIs using requests
18Virtual EnvironmentIsolating project dependencies
19Unit TestingWriting tests with unittest
20CLI ToolCreate a Python CLI using argparse

🏁 Getting Started

🔧 Prerequisites

  • Python 3.8+
  • pip (Python package installer)

▶️ Run Any Example

cd 03_conditionals
python if_else.py

📦 Recommended Setup

Create a virtual environment:

python -m venv venv
source venv/bin/activate # macOS/Linux
venv\Scripts\activate # Windows
pip install -r requirements.txt

🧪 Run Unit Tests

python 19_unit_testing/test_sample.py

🌐 Use the CLI Tool

python 20_cli_tool/cli_greet.py Amit --age 30

🤝 Contributing

Pull requests are welcome! Feel free to:

  • Add new examples
  • Improve existing code
  • Add docstrings or comments

📄 License

This project is licensed under the MIT License.

💡 Author

AmitGitHub

⭐ Star this repo if you find it helpful!

About

A hands-on, beginner-friendly guide to mastering the fundamentals of Python programming.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages