Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
vog
on May 19, 2012
|
parent
|
context
|
favorite
| on:
A few things to remember while coding in Python
Indeed. I prefer the following variant which is more explicit and thus (IMHO) more in the spirit of Python:
(varname,) = [x for x in l if predicate_with_single_truth_value(x)]
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: