What is the purpose of the return statement?

后端 未结 13 2535
难免孤独
难免孤独 2020-11-21 06:28

What is the simple basic explanation of what the return statement is, how to use it in Python?

And what is the difference between it and the print state

13条回答
  •  时光说笑
    2020-11-21 06:49

    I think the dictionary is your best reference here

    Return and Print

    In short:

    return gives something back or replies to the caller of the function while print produces text

提交回复
热议问题