python - Passing Variables From Main Code to Functions as Parameters -
i'm writing number guessing game class in python. trying pass variables main code through functions making them parameters. example:
x = 1; y = 2; z = 3; class exclass: def examplefunction(a,b,c): print a,b,c; r = exclass() r.examplefunction(x,y,z) however, when in code, keep getting errors. specifically: examplefunction() takes 3 arguments (4 given) me this?
thanks much!
Comments
Post a Comment