Skip to content

Tag: dictionary

I don’t understand why my loop is missing numbers

Output shows that the numbers 13 is misplaced and 19 is completely missing, I apologize in advance for the inadequateness of the post, my first question here. Answer The problem is: you use print(f”{name.title()} favorite number is {number}.n”) and number use the number in the previous one. change…

Print dictionary with multiple values seperated

I have a dictioanry that has a key with more than one value: I would like the dictionary on output to look like: My biggest struggle is to get the sam key to print the values on their own line. Answer you can use 2 for loops to first iterate on keys and value (dictionary) and the 2nd one to