-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython learing 7.py
More file actions
40 lines (38 loc) · 1.31 KB
/
python learing 7.py
File metadata and controls
40 lines (38 loc) · 1.31 KB
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
#roll_no = [ 21619151,21619150,21619156,21619160,21619502]
#print(roll_no)
mix_list=[1,'avinash',True,10.3]
#negative value start for last -1,-2,-3 till the end
#print(mix_list[-2])
## u can use both tehniquies to print the segemnet of list value in order print
#print(mix_list[0:]) # or print(mix_list[0:4])
## its actually a step by extende value of three dight with colon probably
#slicing list
moon=[2,0,23,21619150,-69,123,-5,70,45,305,2245,-907]
#print(moon[0:10:3])
#print(moon[2:8:2])
# list have duplication value
##if in the case here the value of list can be sort in arranging order
#moon.sort()
#print(moon)
# the reverse of the list array package
#moon.reverse()
#print(moon)
##this find a maxium number of list in the packae
#print(max(moon))
#print(min(moon))
##updating the value in the list in of last number of list
#mix_list.append(34)
#mix_list.append('abilash')
#print(mix_list)
## insert value in specially in the part of list in index 1 maybe 3 or 0 any where u can insert the value
##u can add the datatype in any index
#moon.insert(4,True)
#print(moon)
#extend it update the list more then one in list but in last of list order
#moon.extend([3,90,84,87,'mubarak'])
#print(moon)
#if u wanna add the value n index directly to datatype in list
#moon[3:6]=45,46,'xerox'
#print(moon)
moon.remove(21619150)
print(moon)