Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Python
  3. Question
Python

Python NoneType object is not callable (beginner)

Asked by Rutuja Mishra Apr 9, 2021 1.6K views 1 answer
Share

About this question

While running the below code,I am getting error nonetype' object is not callable


line 1 and line 5 (new to debugging/programming, not sure if that helps)

def hi():
print 'hi' 
def loop(f, n):
if n<=0: 
return 
else:
f() 
loop(f, n-1) 
loop(hi(), 5) 
hi 
TypeError: 'NoneType' object is not callable
Why does it give me that error?


Your answer

1 Answer

More Python discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Python Blogs

Guides, tips and career advice on Python from JanBask experts.