-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path6-Tuples.py
39 lines (30 loc) · 889 Bytes
/
6-Tuples.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
# --------------------------------------------------------------------------------------------------------------------
#
#
# TUPLES ()
# Squence methoad (+) ,(*) , ([:]) , (INDEX) , (count)
# It's Immutable
# Balance are same as in list
tup_1 = (1, 2, 3, "A", "B", "C")
tup_2 = (4, 5, 6, "D", "E", "F")
tup_3 = (7, 8, 9, 10)
tup = tup_1 + tup_2
# for i in tup: itraction means one by one printing
# print(i)
print(tup)
# print(type(tup))
# Rep
# a = "Hello"*2
# print(a)
#
# a = tup_1.append(10)
# print(a) cannot add here its show error
# print(tup_1)
# print(min(tup_3))
# print((max(tup_3))
a = (16) # It's take 16 is Int
print(type(a))
print(a)
b = (16,) # When you add comma in () , It's will take TUPLES
print(type(b))
print(b)