map_generating.py
def distance_films(year:int, lat:float, lng:float, file:str) -> list:
    '''
    Return list of tuples (each is (film, distance_in_km)) of films which were
    released in the given year, distance_in_km is distance from given point.
    '''
    list_of_films = []
    with open (file, 'r') as csv_file :
        csv_reader = csv.reader(csv_file, delimiter=',')
        for line in csv_reader :
            if int(line[1]) == year :
                distance = haversine_distance(float(line[3]), float(line[2]), lng, lat)
                list_of_films.append((line[0], distance, line[2], line[3]))
    return list_of_films

    Return list of tuples (each is (film, distance_in_km)) of films which were
    released in the given year, distance_in_km is distance from given point.
    
Return list of tuples (each is (film, distance_in_km)) of films which were
released in the given year, distance_in_km is distance from given point.
Return list of tuples ( each is ( film distance_in_km )) of films which were released in the given year distance_in_km is distance from given point .
def distance_films(year:int, lat:float, lng:float, file:str) -> list:
    list_of_films = []
    with open (file, 'r') as csv_file :
        csv_reader = csv.reader(csv_file, delimiter=',')
        for line in csv_reader :
            if int(line[1]) == year :
                distance = haversine_distance(float(line[3]), float(line[2]), lng, lat)
                list_of_films.append((line[0], distance, line[2], line[3]))
    return list_of_films
def distance_films ( year : int , lat : float , lng : float , file : str ) -> list : list_of_films = [ ] with open ( file , 'r' ) as csv_file : csv_reader = csv . reader ( csv_file , delimiter = ',' ) for line in csv_reader : if int ( line [ 1 ] ) == year : distance = haversine_distance ( float ( line [ 3 ] ) , float ( line [ 2 ] ) , lng , lat ) list_of_films . append ( ( line [ 0 ] , distance , line [ 2 ] , line [ 3 ] ) ) return list_of_films
Return list of tuples (each is (film, distance_in_km)) of films which were
released in the given year, distance_in_km is distance from given point.
Return list of tuples ( each is ( film distance_in_km )) of films which were released in the given year distance_in_km is distance from given point .
'''
    Return list of tuples (each is (film, distance_in_km)) of films which were
    released in the given year, distance_in_km is distance from given point.
    '''
year
int
lat
float
lng
float
file
str