17 lines
460 B
Python
17 lines
460 B
Python
import json
|
|
from typing import List, Dict
|
|
def load_vacancies(filepath: str) -> List[Dict]:
|
|
try:
|
|
with open(filepath,"r") as file:
|
|
return json.load(file)
|
|
except:
|
|
print()
|
|
return []
|
|
def filter_by_city(vacancies: List[Dict], city: str) -> List[Dict]:
|
|
return [i for i in vacancies if i.get('city').lower() == city.lower()]
|
|
def main():
|
|
print("Hello World")
|
|
|
|
if __name__ =="__main__":
|
|
#òóïî âûâîä
|
|
main() |