Sep-19-2017, 01:56 AM
Are any of the following ways of iterating over a list of lists better than the otheres (or even different)?
pets = [["Garfield", "cat", 4], ["Dog", "dog", 7.5], ["Porkey", "pig", 61], ["Stoned", "rock", 0.230] ] for name, species, weight in pets: print(name, species, weight) for [name, species, weight] in pets: print(name, species, weight) for (name, species, weight) in pets: print(name, species, weight)