How to Define a Fucntion That Takes an Array as in Put in Python