Print each element in the tuple : Tuple In « Tuple « Python






Print each element in the tuple

Print each element in the tuple

inventory = ("a",
             "b",
             "c",
             "d")

print "\nYour items:"
for item in inventory:
    print item

           
       








Related examples in the same category

1.in function for a string and a tuplein function for a string and a tuple
2.Test for membership with inTest for membership with in