euglug.org

[Python] capitating a list of integers

작성자

카테고리:



Martin KellySat May 12 00:10:17 PDT 2007

> is there a more elegant way to phrase that?

Yes. Use min().

[min(i, 100) for i in n]