This repository is dedicated to exploring Python syntax through examples and explanations.
Comprehensive_Python_Exploration.ipynb: A Jupyter notebook serving as an interactive guide to Python's syntax and features.
The notebook is designed to be a learning resource for both beginners and those looking to deepen their understanding of Python. It covers various aspects of Python syntax with practical examples and clear explanations.
This project is licensed under the MIT License - see the LICENSE file for details.
- Variables and Constants
- Core Data Types
- Numeric Types:
int
,float
- Text Type:
str
- Boolean Type:
bool
- None Type:
NoneType
- Numeric Types:
- Type Conversion
- Operators
- Arithmetic Operators
- Comparison Operators
- Logical Operators
- Assignment Operators
- Bitwise Operators
- Comments
- Single-line Comments
- Multi-line Comments
- Basic Input/Output
print()
functioninput()
function
- Sequence Types:
- Lists (
list
)- Creating and Accessing Lists
- List Methods (
append
,extend
,insert
, etc.)
- Tuples (
tuple
)- Creating and Using Tuples
- Tuple Packing and Unpacking
- Lists (
- Sequence Unpacking (for both lists and tuples)
- Mapping Type: Dictionaries (
dict
)- Creating and Accessing Dictionaries
- Dictionary Methods
- Set Types: Sets (
set
) and Frozen Sets (frozenset
)- Creating Sets
- Set Operations
- Numeric Types:
complex
range
Function and Sequence- Binary Types:
bytes
,bytearray
,memoryview
- List Comprehensions
- Dictionary Comprehensions
- Set Comprehensions
- Advanced String Operations
- Conditional Statements
if
Statementselif
andelse
Clauses
- Loops
for
Loopswhile
Loopselse
clause in loops
- Control Statements
break
continue
pass
- Defining and Calling Functions
- Arguments and Return Values
- Positional Arguments
- Keyword Arguments
- Default Arguments
- Lambda Functions
- Classes and Objects
- Defining Classes
- Creating and Using Objects
- Inheritance
- Single Inheritance
- Multiple Inheritance
- Encapsulation and Polymorphism
- Importing Modules
import
Statementfrom ... import
Statement
- Creating Custom Modules
- Working with Packages
__init__.py
Files- Importing from Packages
- Reading and Writing Files
open()
Function- Reading Methods (
read()
,readline()
,readlines()
) - Writing Methods (
write()
,writelines()
)
- Working with CSV
csv
Module
- Working with JSON
json
Module
- Try-Except Blocks
- Raising Exceptions
- Custom Exceptions
- Generators
- Generator Functions
- Generator Expressions
- Decorators
- Creating and Using Decorators
- Context Managers
with
Statement- Creating Custom Context Managers
- Asynchronous Programming
async
andawait
keywords- Coroutines
datetime
Module- Working with Dates and Times
random
Module- Generating Random Numbers
math
Module- Mathematical Functions
collections
Module- Specialized Container Datatypes