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

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -