def myaverage(y): s = 0.0 for v in y: s = s + v return (s/len(y))and then called from the main program as myaverage(a). The keyword “def” indicates the start of the function definition. Note again the 4 character indent for the function body and the colon after the function name. This is characteristic for python.