2 functions
This commit is contained in:
parent
9ecd53bd3c
commit
ada25201b9
@ -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()
|
||||||
Loading…
Reference in New Issue
Block a user