student_practic/vacancy_analyzer.py
2026-03-23 13:09:48 +03:00

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()