i=10 i() -- it gives an error int is not callable why?

why int or str is not callable?

4/17/2019 3:22:34 AM

Yogesh Mhaskule

4 Answers

New Answer


You can call a function. You just can't call a data type...


I think you can print I without a function but not in SoloLearn. And you can't call objects, you can call methods, functions and classes, but of an object, you only can get their attributes.


It's an object anyway. Then it's Datatype? why python won't allow this? let's say I want print string using same way as my question I = "hello" I() I want output "hello" without creating any function.


Your avatar is so cute