Do I need to write another for loop to print and calculate the total?
Answer
This step can actually be done either way! If you want to print and calculate the total inside of the loop you’ve already made, that works (assuming you do it correctly). If you want to make a new loop and keep it all separate, that works as well!
Is it possible to browse the lists of 02 different dictionaries when they have different keys?
For example :
text1 = {
‘1’ : ['The banana is ','The tomatoes are ',‘Too much’],
‘2’ : [‘a’,‘b’,‘c’]
}
I have the same question.
the order is : banana apple orange pear
and the print is : orange pear banana apple
it’s not alphabetic order, price order or quantity order.
no sort in code.
Python 2 dict objects are not ordered since they do not keep track of insertion order. There is nothing the matter. It’s how it is. Once you begin to work with Python 3 this is one thing you will see has changed (as of 3.6, if I’m not mistaken)
It would be wonderful if they didn’t talk in riddles in the instructions. They way they say things make you think one thing is needed to be done then it turns out something else is needed to be done. Another for loop is a good example. Also, they didn’t give you freedom at the start now it’s like you’re sitting here wondering will you get it wrong if you add something you thought of.