Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Supermarket prices and stock
#python 2.7.12 prices = { "banana": 4, "apple": 2, "orange": 1.5, "pear": 3 } stock = { "banana": 6, "apple": 0, "orange": 32, "pear": 15 } for key in prices: print key print "price: %s" % prices[key] print "stock: %s" % stock[key]
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
building a basic calculator
MPS encoding
Shabnam_ticket
Type lala suthar
Glimpse Of Numpy Python
Filter dictionaries with specific keys
PyClassMethod
python
Nama Bulan Python
fb_series
Please log in to post a comment.