Skip to content

Commit 909203c

Browse files
committed
Added assignment_operators.py to Python-Basic-to-Advance repo
1 parent fadce93 commit 909203c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

assignment_operators.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#shorthand assignment operator
2+
a=5
3+
#a=a+2
4+
#print(a)
5+
a+=2
6+
print(a)
7+
a-=2
8+
print(a)
9+
a*=2
10+
print(a)
11+
a//=2
12+
print(a)
13+
a%=2
14+
print(a)
15+
a**=2
16+
print(a)
17+
a,b,c=8,9,5
18+
print(a,b,c)
19+
print(c)

0 commit comments

Comments
 (0)