TypeError: int() argument must be a string, a bytes-like object or a number, not 'type'

Just started practicing Module 3. I am unable to understand why the error is coming.

The code is very simple and hence not uploading the picture. It is as follows:

r_no = 1729
type(r_no)
int

The above code goes ahead smoothly and I get the desired response.

However, if I do the following (which is as per the course video):

r_no = 1729
print(type(r_no))

Then I get the following error:

TypeError Traceback (most recent call last)
in ()
----> 1 print(type(r_no))

TypeError: int() argument must be a string, a bytes-like object or a number, not ‘type’

Can someone explain what is going wrong?

There is nothing wrong here, try executing again please.
image

1 Like