Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Can't understand why I am getting tuple error even though I typed everything correctly

I am trying to get ‘Hi’ and ‘Hello’ together using identifiers

INPUT:

ankur="Hi"
yash="Hello"
print(ankur, yash)

OUTPUT (Error):

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-41-733bc20e4385> in <module>()
      1 ankur="Hi"
      2 yash="Hello"
----> 3 print(ankur, yash)

TypeError: 'tuple' object is not callable

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

you are using a jupyter notebook. In previous or deleted cells you have redefined the print function to be a tuple. try to input only print without parenthesis to see what value it has.

To solve the issue, just restart the kernel.

Input

type(print)

output

<class 'tuple'>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading