Movatterモバイル変換


[0]ホーム

URL:


Python Programming Ettiquette

zzzzzzzizz_ at notmail.com
Thu Apr 12 02:06:07 EDT 2001


On Thu, 12 Apr 2001 15:45:00 +1000, zzzzz <zzizz_ at notmail.com> wrote:>a) Directly modify the parameter:>x=[1,2,3]>def add4tolist(inputlist):>   inputlist.append(4)>add4tolist(x)>x>[1,2,3,4]<snip>>a) is simpler, however, it only works on immutable typeoops make that mutable!!!!!!!Regards,zzzzz.---------------------


More information about the Python-listmailing list

[8]ページ先頭

©2009-2025 Movatter.jp