Function arguments (in Python for example)

前端 未结 8 2049
离开以前
离开以前 2020-12-03 16:47

What are [function] arguments? What are they used for?
I started learning Python very recently; I\'m new to programming and I apologize for this basic

8条回答
  •  半阙折子戏
    2020-12-03 17:26

    Functions would be useless if you can't give them information they should handle.
    Arguments are such information.

    def GiveMeANumberAndIDuplicateIt(x):
        return x * 2
    
    def DontGiveMeAnythingAtAll():
        return None
    

提交回复
热议问题