how to take a dictionary from this list ?
Shop = ["Apple" , "orange", "mangoo" . "Tomato" . "grape"]
Example
$python shop.py
- apple
- orange
- mangoo
- tomato
- grape
What will u buy? use number (1-5) : 2
You want, "orange", How much do u want it: 10
> {"orange : 10}
- apple
- orange
- mangoo
- tomato
- grape
What will u buy? use number (1-5) : 1
You want, "apple", How much do u want it ?: 3
{"apple : 3" , "orange : 10"}
- apple
- orange
- mangoo
- tomato
- grape
What will u buy? use number (1-5) : 2
You want, "orange", How much do u want it ?: 4
{"apple : 3" , "orange : 14"}
- apple
- orange
- mangoo
- tomato
- grape
And many more...
If I chose same order, like "Apple" I want to Buy "3", in the next command I want to buy 6 " Apple" .
So equal for the apple is "9"...
Note : python 2.7 , this method using looping.
without using zip, def, return and break option.