-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTuple.py
68 lines (49 loc) · 911 Bytes
/
Tuple.py
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=("queen","king","minister")
# print(x)
#
# print(type(x)) # getting the type
#
# print(x[1]) # getting the value by index
# print(x[-1])
#----converting tuple to list to change & convert back to tuple after editing -------------------
# y=list(x)
# print(type(y))
# y[2]="joker"
# y.append('arun')
# x=tuple(y)
# print(type(x))
# print(x)
# for i in x:
# print(i)
# if 'King' in x:
# print("looo......")
# else:
# print('poo.....')
# print(len(x))
# y=(1,2,3)
# z=x+y
# print(z)
#finding the count
y=(1,2,1,2,3,3,4,5,6,5,3,2,4,4,4,2,4,2)
#
# print(y.count(4))
#----------------------------------------------
t=('A','B','C','D','E','F')
# print(t)
# l=list(t)
# l[1]='X'
# t=tuple(l)
# print(t)
# print(t[1])
# print(t[-2])
# for i in t:
# print(i,end=' ')
# if 'AV' in t:
# print('present')
# else:
# print('oops...')
# print(len(t))
# t1=(1,2,3)
#
# print(t+t1)
w