Foreach Array Function In Python With Parameters