Python Tuples
Creating a tuple
names = ("john", "mark", "marrieth")
print(names)Accessing Values in tuples
names = ("john", "mark", "marrieth")
print(names[0])Iterating through a tuple
names = ("john", "mark", "marrieth")
for name in names:
if name == "Abraham":
print('Abraham was found')
print("{} is a name".format(name))Returning tuples from function
Last updated