Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Формируем словарь {процент: [список цен за него]}
- def get_prices_dict(bids):
- prices_dict = {}
- for bid in bids:
- try:
- for percent in bid.keys():
- try:
- percent_price = bid[percent]["Price"]
- if percent in prices_dict:
- prices_dict[percent].append(percent_price)
- else:
- prices_dict[percent] = [percent_price]
- except:
- pass
- except:
- pass
- return prices_dict
Add Comment
Please, Sign In to add comment