Important Notice:

Course Content
Tuples in Python (Chapter-8) M3-R5
About Lesson

Accessing Nested Tuple Items:-

 

a=((10,20,30),[5,8,7],”Hello”)

print(a[0][0])                                         # 10

print(a[1][0])                                         # 5

print(a[2][0])                                         # H

 

Membership Test in Tuples:-

 a=(10,20,30,40)

print(10 in a)                                         # True

error: Content is protected !!