learn-python is a code-short note to understand the basics of Python, designed as a simple, code-first learning aid. To learn, users can uncomment the code lines and execute the files to see how each concept works in practice. It briefly covers core theory such as data types, variables, strings, operators, slicing, input handling, conditionals, loops, functions, return values, and variable scope.
Designed and developed by Supun Wijesooriya.
The learn-python notes include the following:
-
Core Data Types and Variables
- Integers, floats, booleans, and strings
- Basic assignments and updates
-
String Operations
- Concatenation and methods
- Indexing and slicing
-
Operators and Input
- Arithmetic and logical operators
- User input handling
-
Control Flow
- If/elif/else selection patterns
- While loops for repetition
-
Iteration
- For loops with ranges
- Nested loops for simple patterns
-
Functions
- Function definitions and parameters
- Return values
- Variable scope
- Python 3.13: Core language used for all examples
- No External Libraries: All code uses only built-in Python features
learn-python/
├── learnpython.py
└── get_to_know_functions.py
To run the notes locally, follow these steps:
-
Open the repository folder.
-
Uncomment the code lines you want to try in
learnpython.pyorget_to_know_functions.py. -
Run the file in your terminal:
python3 learnpython.py
This project was developed by:
- Supun Wijesooriya
Contributions are welcome. If you would like to contribute, please follow these steps:
-
Fork the repository.
-
Create a new branch:
git checkout -b feature/your-feature-name
-
Make your changes and commit them:
git commit -m "Add your commit message" -
Push your changes to your forked repository:
git push origin feature/your-feature-name
-
Open a pull request to the main repository.
- These notes are intended for learning and revision of Python fundamentals.
- Uncomment only the sections you want to run to avoid conflicting inputs.
- Examples are intentionally minimal to keep the focus on core concepts.
For any enquiries or feedback, please contact the developer:
- Supun Wijesooriya: GitHub Profile
- Project Repository: learn-python