Skip to content

Commit f681eb7

Browse files
authored
Create List.py
1 parent f70a239 commit f681eb7

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

List.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
'''
2+
3+
Quality of List in python
4+
5+
'''
6+
7+
a=list(map(int,input().split(" ")))
8+
if(a[0]>a[1]):
9+
print("1st Element is Greater")
10+
else:
11+
print("2nd Element is Greater")
12+
13+
a.append(3)
14+
print(a)
15+
16+
a.extend([1,3,4])
17+
print(a)
18+
19+
a.pop(4) # by index
20+
print(a)
21+
22+
a.insert(4,3)
23+
print(a)
24+
25+
print(a[1:3])
26+
27+
print(a.count(3))
28+
29+
print(min(a),max(a))
30+
31+
print(a*2)
32+

0 commit comments

Comments
 (0)