I'm trying to use the max function in Python 3,6:
print('Maximum is:', max(1, 3, 2, 5, 4))
And the result is
File "E:/ProgramyRobione/untitled1.py", line 2, in <module>
print('Maximum is:', max(1, 3, 2, 5, 4))
TypeError: 'int' object is not callable
I'm using Spyder and that line is all that code should do.
This is a bit of an iPython headshot that comes with Spyder. I've fallen foul of this when copy/pasting random bits of code from SO to test only to find really odd behaviour several days later - variables defined in the iPython console will also be in the script's global namespace indefinitely.
There's two things you can do:
ctrl
+ .
)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.