Aug-18-2017, 07:46 PM
Hello all, new to Python and programming and having an issue here that I can't figure out. I'm getting a value error from this code. I'm trying to print out their names neatly and their favourite numbers, very simple.
Any help appreciated, thanks!
Any help appreciated, thanks!
favourite_numbers = { 'mara': ['0', '51'], 'jared': ['1', '73'], 'stranger1': ['2', '61'], 'stranger2': ['3', '9053'], 'stranger3': ['4', '7'], } #looping through dictionary favourite_numbers for name, number in favourite_numbers: print(name.title() + "'s favourite numbers are: ") for nums in number: print("\t" + nums)