tumble. phil adams.

  • Archive
  • RSS

a = 0 if random.random() < 0.5 else 1

in love with python’s take on the ternary operator…

  • 3 years ago
  • 1
  • Permalink
  • Share
    Tweet

1 Notes/ Hide

  1. dstrelau reblogged this from philadamsdotnet and added:
    The first time I tried to use a ternary...Python, I typed the traditional cond ? if : else...
  2. philadamsdotnet posted this
← Previous • Next →

About

<witty description />
  • RSS
  • Random
  • Archive
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr