-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlist.py
More file actions
68 lines (54 loc) · 1.08 KB
/
list.py
File metadata and controls
68 lines (54 loc) · 1.08 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# x = [1,2,3,0,'a','dhyey7',1.7,0,1,2,1,True]
# print(x)
# x.append(4)
# print(x)
# x.clear()
# print(x)
# x.copy()
# print(x)
# y = x.count(1)
# z = x.count(2)
# p = x.count(0)
# print(y,z,p)
# cars = ['Bmw','maruti']
# more_cars =['tata']
# print(cars)
# cars.append(more_cars)
# print(cars)
# cars.extend(more_cars)
# print(cars)
# list of animals
# Animals= ["cat", "dog", "tiger",'hhhh']
# searching positiion of dog
# print(Animals.index("hhhh"))
# a =[1,2,3,5,7]
# print(a.index(7))
# print(a.index(2,0,3))
# a =[1,2,3,5,7,1,2]
# a.insert(3,15)
# print(a)
# b = [3,5,7,14,9]
# print(b)
# b.pop(2)
# print(b)
# c = [1,2,3,34,5,5,1,3,2]
# print(c)
# c.remove(34)
# print(c)
# c.remove(1)
# print(c)
# c.reverse()
# print(c)
# d = [1,5,2,6,3,8,4]
# d.sort(reverse=True)
# print(d)
# x,y,z=1,[1,2,3.5,[25,'name',[2,5,7]]],[10,20,0,["hyy",7],'10.5',"world"]
# print(z)
# print(z[1:2])
# print(z[-4:-1])
# print(z[-1:-4:-1])
# print(z[5:2:-1])
# print(z[1],z[3])
# print(y[3][2][2])
x = 'my name is dhyey'
print(x[9:7:-1])