This repository contains a collection of Python scripts created for learning and demonstration purposes. The scripts cover fundamental concepts, file handling, and object-oriented programming (OOP) in Python.
The project is organized into the following directories:
src/basics/: Contains scripts demonstrating fundamental Python concepts.src/file_handling/: Includes examples of file manipulation, such as reading and writing to files, and working with CSV data.src/oops/: Provides scripts that illustrate the principles of object-oriented programming in Python.
The src/basics/ directory includes scripts covering:
- Data Types:
all_datatype.py - String Manipulation:
string_concatenation.py,string_methods.py,string_types.py,f_strings.py,format_method.py,advanced_formatting.py - Data Structures:
list_basic.py,list_methods.py,list_comprehension.py,tuple_complete.py,dict_complete.py,set_methods.py - Functions:
func.py,args.py,kwargs.py,main_func.py - Control Flow:
looping_techniques.py - Slicing:
extended_slicing.py,slice_constructor.py - Scope:
global_local.py - Input/Output:
input_output.py - Typing:
typing_module.py
The src/file_handling/ directory demonstrates:
- Basic File Operations:
file_handling.py,copy_file.py - Working with CSV Files:
csv_demo.py - Practical Examples:
copy_photos.py,make_table.py
The src/oops/ directory contains examples of:
- Classes and Instances:
classes_instances.py - Class Attributes:
class_attribute_1.py,class_attribute_2.py - Class and Static Methods:
class_static_method.py - Dunder Methods:
dunder_methods.py
To run any of the scripts, navigate to the appropriate directory and execute the Python file. For example, to run the all_datatype.py script:
python src/basics/all_datatype.pyContributions to this repository are welcome. If you have a Python script that demonstrates a concept in a clear and concise way, feel free to submit a pull request. Please ensure that your code is well-commented and follows the existing structure of the repository.