map_generating.py
def ten_nearest(list_of_films:list) -> list:
    '''
    Return ten (or less) most close to films to given point.
    '''
    nearest_films = []
    for bottom in range (len(list_of_films) - 1) :
        idx = bottom
        for itr in range (bottom+1, len(list_of_films)) :
            if list_of_films[itr][1] < list_of_films[idx][1] :
                idx = itr
        list_of_films[bottom], list_of_films[idx] = list_of_films[idx],\
             list_of_films[bottom] #sorting by distance
    idx = 10
    if len(list_of_films) < 10 :
        idx = len(list_of_films)
    for itr in range(idx) :
        nearest_films.append((list_of_films[itr][0], list_of_films[itr][2],\
             list_of_films[itr][3]))
    return nearest_films

    Return ten (or less) most close to films to given point.
    
Return ten (or less) most close to films to given point.
Return ten ( or less ) most close to films to given point .
def ten_nearest(list_of_films:list) -> list:
    nearest_films = []
    for bottom in range (len(list_of_films) - 1) :
        idx = bottom
        for itr in range (bottom+1, len(list_of_films)) :
            if list_of_films[itr][1] < list_of_films[idx][1] :
                idx = itr
        list_of_films[bottom], list_of_films[idx] = list_of_films[idx],\
             list_of_films[bottom] 
    idx = 10
    if len(list_of_films) < 10 :
        idx = len(list_of_films)
    for itr in range(idx) :
        nearest_films.append((list_of_films[itr][0], list_of_films[itr][2],\
             list_of_films[itr][3]))
    return nearest_films
def ten_nearest ( list_of_films : list ) -> list : nearest_films = [ ] for bottom in range ( len ( list_of_films ) - 1 ) : idx = bottom for itr in range ( bottom + 1 , len ( list_of_films ) ) : if list_of_films [ itr ] [ 1 ] < list_of_films [ idx ] [ 1 ] : idx = itr list_of_films [ bottom ] , list_of_films [ idx ] = list_of_films [ idx ] , list_of_films [ bottom ] idx = 10 if len ( list_of_films ) < 10 : idx = len ( list_of_films ) for itr in range ( idx ) : nearest_films . append ( ( list_of_films [ itr ] [ 0 ] , list_of_films [ itr ] [ 2 ] , list_of_films [ itr ] [ 3 ] ) ) return nearest_films
Return ten (or less) most close to films to given point.
Return ten ( or less ) most close to films to given point .
'''
    Return ten (or less) most close to films to given point.
    ''' #sorting by distance
list_of_films
list