查看完整版本 : 我想繼續學python

逍遙老僧 2024-1-10 00:16

我見到一句
count+= func()


乜function 是可以加的嗎?

蟹於海 2024-1-10 01:40

the result returned from the function, is to be added on, and the final result is then to be stored on the variable "count". :smile_34:

逍遙老僧 2024-1-10 03:55

[quote]原帖由 [i]蟹於海[/i] 於 2024-1-10 01:40 發表 [url=https://www.discuss.com.hk/redirect.php?goto=findpost&pid=563869565&ptid=31431539][img]https://www.discuss.com.hk/images/common/back.gif[/img][/url]

the result returned from the function, is to be added on, and the final result is then to be stored on the variable "count". :smile_34: [/quote]
乜function 一定return 1 的?

Zzlaz 2024-1-10 09:20

睇func() return乜

逍遙老僧 2024-1-10 10:08

[quote]原帖由 [i]Zzlaz[/i] 於 2024-1-10 09:20 發表 [url=https://www.discuss.com.hk/redirect.php?goto=findpost&pid=563872664&ptid=31431539][img]https://www.discuss.com.hk/images/common/back.gif[/img][/url]

睇func() return乜 [/quote]
係喎!多謝

逍遙老僧 2024-1-10 13:22

[quote]原帖由 [i]蟹於海[/i] 於 2024-1-10 01:40 發表 [url=https://www.discuss.com.hk/redirect.php?goto=findpost&pid=563869565&ptid=31431539][img]https://www.discuss.com.hk/images/common/back.gif[/img][/url]

the result returned from the function, is to be added on, and the final result is then to be stored on the variable "count". :smile_34: [/quote]
係喎。多謝!
頁: [1]
查看完整版本: 我想繼續學python