Python def function: How do you specify the end of the function?

后端 未结 8 1664
迷失自我
迷失自我 2020-12-04 19:21

I\'m just learning python and confused when a \"def\" of a function ends?

I see code samples like:

def myfunc(a=4,b=6):
    sum = a + b
    return su         


        
8条回答
  •  无人及你
    2020-12-04 19:52

    Python is white-space sensitive in regard to the indentation. Once the indentation level falls back to the level at which the function is defined, the function has ended.

提交回复
热议问题