Skip to content

Commit d44cb83

Browse files
committed
Added for_loop.py
1 parent 14b0485 commit d44cb83

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

for_loop.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name='Jenny'
2+
for i in name:
3+
print(i)
4+
names=['Jenny','Ram','Shyam']
5+
for i in names:
6+
print(i)
7+
if i=='Jenny':
8+
print("Hey,It's me")
9+
numbers=[2,3,5,-2,10]
10+
squares=[]
11+
for i in numbers:
12+
square=i**2
13+
squares.append(square)
14+
print("The list of squares is:",squares)

0 commit comments

Comments
 (0)