Python Error Calling Function Within Function
Question: I am a novice in python. I just extended the Hello World program:

    
    
    import sys
    
    def first(n):
        print "Hi Man"+" Huuuuuu"
        if len(sys.argv)>1: print sys.argv[1]
    
    def second():
        print "Huuuuuuuuuuu"    
        first(7)
    
    if __name__=='__main__':
        second()
    

I get the error:

    
    
    File "first.py", line 11
        first(7)
        ^
    IndentationError: unexpected indent
    

I read [What to do with "Unexpected indent" in
python?](http://stackoverflow.com/questions/1016814/what-to-do-with-
unexpected-indent-in-python), but I can't find the error.

I ran with python -t command:

    
    
    python -t first.py
    first.py: inconsistent use of tabs and spaces in indentation
      File "first.py", line 12
        first(7)
        ^
    IndentationError: unexpected indent
    

Thanks for your help.


Answer: Python generally works by the indentation instead of curly braces block. In
your case check the blank spaces in front of `first(7)` statement are matching
with the blank spaces with the first `print` statement.

Check if you have putted the tab character in one of the statement. generally
we put the 4 blank spaces in front of the statement.

