I have a function and I want it to execute. Does anyone know how to do this?
def a():
a = 'print'
print a
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To do this you just use.
If you want this for use inside the current file use:
And if you want to pass the variable a on for use in other functions use:
The ‘b’ being the variable and ‘a’ being the function you have defined.
So the whole function could look like this: