On Thu, 2003-02-06 at 17:38, Ka-Ping Yee wrote: > For example, here's a common idiom i use in C: > > printf("Read %d file%s.", count, count == 1 ? "" : "s"); Just for giggles, here is a python version: print "Read %d file%s." % (count, {1:""}.get(count,"s")) Exact same number of characters, even. :) -- Bay Area Python Interest Group - http://www.baypiggies.net/ Chad Netzer (any opinion expressed is my own and not NASA's or my employer's)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4