[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help!!! How to apply my created function to another function

djoyceb at gmail.com wrote:

> def buildVector(v) :
>     print(v[0],v[1],v[2])

If you want to be able to use the result of this function
in another computation, you need to return it, not print it:

def buildVector(v) :
     return (v[0],v[1],v[2])

Similarly with buildRandomVector and vectorMagnitude.