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

Modern Programming

lemmy.zip

message-square
76
fedilink
585

Modern Programming

lemmy.zip

Maven (famous) to Programmer Humor@programming.dev • 10 days ago
message-square
76
fedilink
  • Digital Mark
    link
    fedilink
    English
    39•10 days 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
      8•10 days ago

      Cursed

      • Gamma
        link
        fedilink
        English
        11•9 days ago

        Not as cursed as

        print("eovdedn"[n%2::2]) 
        
        • @FireIced@lemmy.super.ynh.fr
          link
          fedilink
          1•9 days 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
  • 972 users / day
  • 4.03K users / week
  • 10K users / month
  • 19.7K users / 6 months
  • 24.4K subscribers
  • 1.52K Posts
  • 56.7K Comments
  • Modlog
  • mods:
  • Feyter
  • adr1an
  • @BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne
  • BE: 0.19.3
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org