Knowledge organisersArrays and Records
Pass list to functions.
You can pass a list to a function as a parameter. Functions can read, modify, or return new lists. Changes to the list inside the function affect the original.
def find_highest(scores):
highest = scores[0]
for s in scores:
if s > highest:
highest = s
return highest
marks = [72, 85, 91, 68]
print(find_highest(marks)) # 91