An open API service indexing awesome lists of open source software.

https://github.com/usmanmern/python-basic


https://github.com/usmanmern/python-basic

Last synced: 11 months ago
JSON representation

Awesome Lists containing this project

README

          

# Python Learning Journey

This repository documents my journey of learning Python, covering various fundamental and advanced topics. Each folder contains scripts and examples that illustrate the concepts and techniques I have learned.

## Table of Contents

1. [01_basics](#01_basics)
2. [02_conditionals](#02_conditionals)
3. [03_loops](#03_loops)
4. [04_iteration_tools](#04_iteration_tools)
5. [05_functions](#05_functions)
6. [06_scope](#06_scope)
7. [07_oop](#07_oop)
8. [08_decorators](#08_decorators)
9. [09_error_handling](#09_error_handling)
10. [10_database_sqlite3](#10_database_sqlite3)

## 01_basics

### Description

This folder contains scripts that cover the basics of Python programming, including variables, data types, input/output operations, and basic arithmetic operations.

### Key Concepts

- Variables and Data Types
- Basic Input/Output
- Arithmetic Operations
- Comments and Documentation

### Examples

- `variables.py`
- `data_types.py`
- `input_output.py`
- `basic_operations.py`

## 02_conditionals

### Description

This folder contains scripts that demonstrate the use of conditional statements in Python, including `if`, `elif`, and `else`.

### Key Concepts

- `if` Statements
- `elif` and `else` Clauses
- Nested Conditionals
- Logical Operators

### Examples

- `if_else.py`
- `nested_conditionals.py`
- `logical_operators.py`

## 03_loops

### Description

This folder contains scripts that illustrate different looping constructs in Python, such as `for` and `while` loops.

### Key Concepts

- `for` Loops
- `while` Loops
- Loop Control Statements (`break`, `continue`, `pass`)
- Iterating Over Data Structures

### Examples

- `for_loops.py`
- `while_loops.py`
- `loop_control.py`
- `iterate_data_structures.py`

## 04_iteration_tools

### Description

This folder explores Python's iteration tools from the `itertools` module, which provides a set of fast, memory-efficient tools for working with iterators.

### Key Concepts

- `itertools` Module
- Infinite Iterators
- Combinatoric Iterators
- Terminating Iterators

### Examples

- `infinite_iterators.py`
- `combinatoric_iterators.py`
- `terminating_iterators.py`

## 05_functions

### Description

This folder contains scripts that cover defining and using functions in Python, including parameter passing, return values, and lambda functions.

### Key Concepts

- Defining Functions
- Parameters and Arguments
- Return Values
- Lambda Functions
- Function Scope and Lifetime

### Examples

- `defining_functions.py`
- `parameters_arguments.py`
- `return_values.py`
- `lambda_functions.py`

## 06_scope

### Description

This folder contains scripts that illustrate the concept of scope in Python, including global, local, and nonlocal scope.

### Key Concepts

- Global Scope
- Local Scope
- Nonlocal Scope
- Scope Resolution (`LEGB` Rule)

### Examples

- `global_scope.py`
- `local_scope.py`
- `nonlocal_scope.py`
- `scope_resolution.py`

## 07_oop

### Description

This folder explores Object-Oriented Programming (OOP) concepts in Python, including classes, objects, inheritance, and polymorphism.

### Key Concepts

- Classes and Objects
- Methods and Attributes
- Inheritance
- Polymorphism
- Encapsulation

### Examples

- `classes_objects.py`
- `methods_attributes.py`
- `inheritance.py`
- `polymorphism.py`

## 08_decorators

### Description

This folder contains scripts that demonstrate the use of decorators in Python, which are a powerful tool for modifying the behavior of functions or methods.

### Key Concepts

- Function Decorators
- Class Decorators
- Decorator Syntax
- Using `functools.wraps`

### Examples

- `function_decorators.py`
- `class_decorators.py`
- `decorator_syntax.py`
- `functools_wraps.py`

## 09_error_handling

### Description

This folder covers error handling in Python, including the use of `try`, `except`, `else`, and `finally` blocks, as well as custom exceptions.

### Key Concepts

- `try` and `except` Blocks
- `else` and `finally` Clauses
- Raising Exceptions
- Custom Exceptions

### Examples

- `try_except.py`
- `else_finally.py`
- `raising_exceptions.py`
- `custom_exceptions.py`

## 10_database_sqlite3

### Description

This folder contains scripts that demonstrate how to interact with SQLite databases in Python using the `sqlite3` module.

### Key Concepts

- Connecting to SQLite Databases
- Creating Tables
- Inserting Data
- Querying Data
- Updating and Deleting Data

### Examples

- `connect_database.py`
- `create_table.py`
- `insert_data.py`
- `query_data.py`
- `update_delete_data.py`

## How to Use

1. Clone the repository:
```sh
git clone https://github.com/UsmanMERN/python-basic
```
2. Navigate to the desired folder.
3. Run the Python script using:
```sh
python script_name.py
```

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.