January 2019
Beginner
318 pages
8h 23m
English
Like lists, there are five basic tuple operations:
|
Description |
Expression |
Results |
|
Iteration |
for x in (45,58,99) : print (x,end = ' ') |
45 58 99 |
|
Repetition |
('Python') * 3 |
('python', 'python', 'python') |
|
Length |
len(45, 58, 99, 65) |
4 |
|
Concatenation |
(30, 50, 60) + ('Hello', 75, 66) |
(30,50,60,'Hello',75,66) |
|
Membership |
45 in (45,58,99,65) |
True |
Read now
Unlock full access