Python 2.7.5: Change type 'function' to type 'int'
I have a function that returns a number. I added this number to an integer
type but it threw me an error, saying the number returned by the function
was a 'function' type.
How do I convert the 'function' type to 'int' type so i can perform math
functions on them? Is there a way to make the function return an 'int'? I
tried the following in the function but it still won't return an 'int'
type:
return int(blah blah blah)
but the function still returns:
type 'function'
No comments:
Post a Comment