forked from deepdalsania/tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathForDemo.py
More file actions
40 lines (34 loc) · 853 Bytes
/
ForDemo.py
File metadata and controls
40 lines (34 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import math as m
# list mutable
# a = ['deep',410,'dalsania',10.4]
# string
# a = 'Deep Dalsania'
# set it doesn't follow a sequence
#a = {'deep',410,'dalsania',10.4}
# tuple immutable
#a = ('deep',410,'dalsania',10.4)
# default increment is 1
'''for i in a :
print(i)'''
'''for i in ['deep',410,'dalsania',10.4] :
print(i)'''
'''for i in range(10) :
print(i)'''
'''for i in range(11,20,2) :
print(i)'''
# reverse
'''for i in range(20,10,-2) :
print(i)'''
'''for i in range(1,51) :
if (i % 5 != 0) :
print(i)'''
# code for finding perfect root
'''for i in range(1,501) :
a = int (m.sqrt(i))
if(i == a*a):
print(i,' is a perfect square number because %d * %d = %d'%(a,a,i))
else:
print(i,' is not perfect square number')'''
a = ['abc','def','g','hi']
for i in range(4):
print(i,a[i])