Create a tuple with some items and display with a for loop : Tuple Loop « Tuple « Python






Create a tuple with some items and display with a for loop

Create a tuple with some items and display with a for loop
 


inventory = ("a",
             "b",
             "c",
             "d")
print "Your items:"
for item in inventory:
    print item

           
         
  








Related examples in the same category

1.Iterate over a string and tuple
2.Tuple assignment in for