monyet.cc
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Maven (famous) to Programmer Humor@programming.dev • 2 months ago

Modern Programming

lemmy.zip

message-square
77
fedilink
588

Modern Programming

lemmy.zip

Maven (famous) to Programmer Humor@programming.dev • 2 months ago
message-square
77
fedilink
  • Digital Mark
    link
    fedilink
    English
    42•2 months ago

    print( ["even", "odd"][num % 2] )

    If you need to avoid evaluating the wrong branch:

    print( [lambda: "even", lambda: "odd"][num % 2]() )

    • @FireIced@lemmy.super.ynh.fr
      link
      fedilink
      9•2 months ago

      Cursed

      • Gamma
        link
        fedilink
        English
        13•2 months ago

        Not as cursed as

        print("eovdedn"[n%2::2]) 
        
        • @FireIced@lemmy.super.ynh.fr
          link
          fedilink
          1•2 months ago

          Indeed

Programmer Humor@programming.dev

!programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
  • 1.23K users / day
  • 4.9K users / week
  • 8.78K users / month
  • 20.1K users / 6 months
  • 25.7K subscribers
  • 1.66K Posts
  • 61.9K Comments
  • Modlog
  • mods:
  • Feyter
  • adr1an
  • @BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne
  • BE: 0.19.3
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org