I'm currently taking a Python course on Udemy and I'm at the point where I'm learning to create my own functions. In the section dealing with functions and tuple unpacking, I was shown the example function:
def employee_check(work_hours):
current_max = 0
employee_of_month = ''
for employee,hours in work_hours:
if hours > current_max:
current_max = hours
employee_of_month = employee
else:
pass
#Return
return(employee_of_month,current_max)
My question is simply what is the point of putting pass as an else statement in this specific example? Messing around, it seems to still operate properly whenever I take it out, is there a use that I'm not aware of or is it just a good habit to get into when creating functions?
EDIT: The purpose of the function being to designate the employee of the month based on total hours worked