Get data out
In this exercise, you're going to practice exploring dictionaries and retrieving data stored in a simple dictionary. The dictionary avocados is loaded into your workspace, which includes information about a single purchase of avocados.
The dictionary has the following keys:
varietyis the variety of avocado purchased.countis the number of avocados purchased.price_eachis the price per avocado, in USD.organicindicates whether or not these are organic avocados.dateis the date of this purchase.
Let's use these keys to learn more about this transaction.
Bu egzersiz
Python for MATLAB Users
kursunun bir parçasıdırUygulamalı interaktif egzersiz
Bu örnek kodu tamamlayarak bu egzersizi bitirin.
# Print the value for 'variety'
print(avocados[____])