Advertisement
elsemTim

python_22042

Feb 21st, 2019
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. import json
  2.  
  3. filename = "Streets.json"
  4.  
  5. with open(filename, mode='r', encoding='UTF-8') as json_data:
  6.     street_list = json.load(json_data)
  7.  
  8. house_list = []
  9.  
  10. for street in street_list:
  11.     if str(street['street']) == "пр-т Боголюбова":
  12.         house_list.append(str(street['house']))
  13.  
  14. for house in house_list:
  15.     if house == "8":
  16.         print(" Мы нашли дом под номером: " + house)
  17.     else:
  18.         print(" Мы не нашли дом..")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement