2 functions
This commit is contained in:
parent
9ecd53bd3c
commit
ada25201b9
@ -1,11 +1,17 @@
|
||||
import json
|
||||
import csv
|
||||
def output_ls():
|
||||
print(1)
|
||||
print(2)
|
||||
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")
|
||||
output_ls()
|
||||
|
||||
if __name__ =="__main__":
|
||||
#òóïî âûâîä
|
||||
main()
|
||||
Loading…
Reference in New Issue
Block a user