2 functions

This commit is contained in:
Crai-cry 2026-03-23 13:09:48 +03:00
parent 9ecd53bd3c
commit ada25201b9

View File

@ -1,11 +1,17 @@
import json import json
import csv from typing import List, Dict
def output_ls(): def load_vacancies(filepath: str) -> List[Dict]:
print(1) try:
print(2) 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(): def main():
print("Hello World") print("Hello World")
output_ls()
if __name__ =="__main__": if __name__ =="__main__":
#òóïî âûâîä #òóïî âûâîä
main() main()