Mega Code Archive

 
Categories / Python / Tuple
 

Iterate over a string and tuple

S = "lumberjack"  T = ("and", "I'm", "okay")  for x in S: print x,                      # Iterate over a string for x in T: print x,                      # Iterate over a tuple