python file changes for language and average of pitches