Refactoring life

  1. Search
  2. Subscribe
  3. Archive
  4. Random
Newer
Older
  • First True value in a list in python

    I needed the first true value in a list, and someone challenged me to some code golf:

    »> reduce(lambda x,y: x or y, [False, False, 1, False, 2])

    1

    Posted on November 3, 2011

  • emergentfutures
  • fuckyeahdementia
  • spiritedmag
  • laughingsquid
  • legoexpress
  • delgrosso
  • j2d2
  • epic4chan
  • fred-wilson
  • proustitute
  • mattlovescomics
  • inadvisable
  • bookshelfporn
  • troisenator
  • christielouwho
  • jephjacques
  • maxistentialist
  • theatlantic
  • allthewaydown
  • smarterplanet
  • subtilitas
  • j2labs
  • theshipthatflew
  • powells
  • futuramb
  • criminalwisdom
  • littleworries
  • thedrunkenmoogle
  • mediafuturist
  • tomoatmeal
  • alligatortower
  • sablesma
  • whydoihaveablog
  • viscerality
  • floodlite
  • senchainc
  • hellonewyork
  • emilenox
  • jgzogaib
  • 9-bits
  • chr0n1x
  • lookatthisfuckingjuggalo
  • azul
  • solfdaggen
  • notch
  • themonkeysyouordered
  • icodeforlove
  • aznstarlette
  • justyummyfood
  • fuckyeahclassical
  • radicalquaker
  • adamlongwill
  • godelescherbach
  • nbr
  • fuckyeahjaneway
  • kaffeinkatmandu
  • jqtouch
  • allthingsoregon
  • aurai
  • thejuggalog
  • timmyintransit
  • thelategreatme
  • confusionist
  • babiesareyum
  • gremmllin
  • fareastvagabond
  • play-grounds
  • scottkurtz
  • calixte
  • lowres
  • mycatisretarded
  • tipsforpros
  • troublewith

Field Notes Theme. Designed by Manasto Jones. Powered by Tumblr.