Okay so I have a file with names of some cars and how old they are in years, layed out like this but each one is a new line:
Ford Focus - 5
Ford Focus - 7
Ford Focus - 3
VW Golf - 2
VW Golf - 6
VW Golf - 1
I am trying to find a way to tuple this, but so the details are seperate tuples like this:
[(Ford Focus - 5), (Ford Focus - 7), (Ford Focus - 3), (VW Golf - 2), (VW Golf - 6), (VW Golf - 1)]
Thanks
list comprehension
for loop