Skip to content

Commit 0e30cf8

Browse files
committed
21-Python 3.12 Docs
1 parent c9d3f57 commit 0e30cf8

1 file changed

Lines changed: 32 additions & 94 deletions

File tree

topics.txt

Lines changed: 32 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,35 @@
1-
00 Introduction
2-
01 Inner working of Python
3-
02 Github Codespace
4-
03 Mutable and Immutable
5-
04 Data Types
6-
05 Numbers in Depth
7-
06 Strings
8-
07 Lists
9-
08 Dict
10-
09 Tuples
11-
10 Set
12-
11 Internal working of copy, reference
13-
12 Conditional statements
14-
13 Looping statements
15-
14 Behind the scene of Loop
16-
15 Functions
17-
16 Scopes and Closure
18-
17 OOPs
19-
19 Decorators in Python
20-
20 File Handling
21-
21 Exception Handling
22-
22 Virtual Environment
23-
23 More on Python
24-
24 Project 1 : Video & Music Downloader (GUI)
25-
25 Project 2 :
26-
26 Project 3 :
27-
27 Python with MySQL, MongoDB, Postgres
28-
25 Python in Different Environment(Win, Mac, Linux, Docker, Cloud, AWS, DigitalOcean)
29-
23 Flask
30-
24 Django
1+
00 Introduction
2+
01 Inner working of Python
3+
02 Github Codespace
4+
03 Mutable and Immutable
5+
04 Data Types
6+
05 Numbers in Depth
7+
06 Strings
8+
07 Lists
9+
08 Dict
10+
09 Tuples
11+
10 Set
12+
11 Internal working of copy, reference
13+
12 Conditional statements
14+
13 Looping statements
15+
14 Behind the scene of Loop
16+
15 Functions
17+
16 Scopes and Closure
18+
17 OOPs
19+
19 Decorators in Python
20+
20 File Handling
21+
21 Exception Handling
22+
22 Virtual Environment
23+
23 Map, Filter & Reduce
24+
24 Python 3.12 Docs
25+
25 Packages, Modules & Libraries
26+
26 Project 1 :
27+
27 Working with APIs
28+
28 Python with Databases
29+
29 Web Scraping
30+
30 Python in Different Environment(Win, Mac, Linux, Docker, Cloud, AWS, DigitalOcean)
31+
31 Flask
32+
32 Django
3133

3234

3335
1. Notepad
@@ -47,67 +49,3 @@
4749

4850
5. Build Bricks Breaker Game
4951
- code for bricks breaker game using python tkinter with good gui
50-
51-
52-
# More On Python
53-
54-
55-
## Map, Fileter and Reduce Functions
56-
57-
## 1. Walrus Operator (:=)
58-
Introduced in Python 3.8, the walrus operator allows assignment expressions, enabling assignment and return of a value in a single expression. This is particularly useful in loops and comprehensions.
59-
```python
60-
# Not Allowed
61-
print(is_alive=False)
62-
# Allowed
63-
print(is_active:=True)
64-
```
65-
66-
## 2. Matrix Multiplication Operator (@)
67-
Introduced in Python 3.5, the '@' operator is used for matrix multiplication, which is especially useful in numerical computing and machine learning applications.
68-
```python
69-
import numpy as np
70-
71-
a = np.array([[1, 2], [3, 4]])
72-
b = np.array([[5, 6], [7, 8]])
73-
74-
# Matrix multiplication
75-
c = a @ b
76-
print(c)
77-
```
78-
79-
## 3. New String Formatting (f-strings)
80-
Introduced in Python 3.6, f-strings provide a way to embed expressions inside string literals, using curly braces '{}'.
81-
```python
82-
name = "Abhinay"
83-
age = 21
84-
print(f"My name is {name} and I am {age} years old.")
85-
```
86-
## 4. Enhanced Unpacking
87-
Python 3.5 introduced extended unpacking with the '*' operator to allow more flexible unpacking operations.
88-
```python
89-
a, *b, c = [1, 2, 3, 4, 5]
90-
print(a) # 1
91-
print(b) # [2, 3, 4]
92-
print(c) # 5
93-
```
94-
## 5. Positional-Only Parameters
95-
Introduced in Python 3.8, positional-only parameters are defined by adding a '/' in the function signature. These parameters can only be passed positionally, not as keyword arguments.
96-
```python
97-
def greet(name, /, greeting="Hello"):
98-
return f"{greeting}, {name}!"
99-
100-
print(greet("Abhinay")) # Works
101-
# print(greet(name="Abhinay")) # Raises TypeError
102-
```
103-
104-
## 6. Keyword-Only Parameters
105-
Defined by adding '*' in the function signature, parameters following '*' can only be passed as keyword arguments.
106-
```python
107-
def greet(*, name, greeting="Hello"):
108-
return f"{greeting}, {name}!"
109-
110-
print(greet(name="Abhinay")) # Works
111-
# print(greet("Abhinay")) # Raises TypeError
112-
```
113-
These new operators and enhancements make Python more expressive and capable of handling various programming paradigms more efficiently.

0 commit comments

Comments
 (0)