TypeError: '<' not supported between instances of 'int' and 'builtin_function_or_meth - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: TypeError: '<' not supported between instances of 'int' and 'builtin_function_or_meth (/thread-16581.html) |
TypeError: '<' not supported between instances of 'int' and 'builtin_function_or_meth - yann2771 - Mar-05-2019 z = input a = 0; b = 1; if a == z: print ('dsdaa'); if b < z: print ('kdaas'); whats wrong i just started doing this for school project? RE: TypeError: '<' not supported between instances of 'int' and 'builtin_function_or_meth - stranac - Mar-05-2019 z = input means z now refers to the same thing as input , which is a built-in function.If you want to get actual input from the user, you'll have to call the function, i.e. z = input() .If you want to compare that input to 0 and 1, you'll also have to convert it toan int. |