This is my part of the code:
import functions
def assign_tasks(operators, requests, current_time):
sort_requests(requests)
print(requests)
The error is:
NameError: name 'sort_requests' is not defined
The function module has the following functions:
def sort_requests(requests):
requests.sort(key=operator.itemgetter(3),reverse=True)
return requests
def sort_operators_hours(operators):
operators.sort(key=operator.itemgetter(4))
return operators
functions.sort_request(requests)or change your import line:from functions import sort_requests