SDF Chatter
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Maven (famous)@lemmy.zip to Programmer Humor@programming.dev · 1 年前

Modern Programming

lemmy.zip

message-square
77
link
fedilink
591

Modern Programming

lemmy.zip

Maven (famous)@lemmy.zip to Programmer Humor@programming.dev · 1 年前
message-square
77
link
fedilink
  • Digital Mark
    link
    fedilink
    English
    arrow-up
    43
    arrow-down
    1
    ·
    1 年前

    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
      arrow-up
      11
      arrow-down
      1
      ·
      1 年前

      Cursed

      • Gamma@programming.dev
        link
        fedilink
        English
        arrow-up
        14
        ·
        1 年前

        Not as cursed as

        print("eovdedn"[n%2::2]) 
        
        • FireIced@lemmy.super.ynh.fr
          link
          fedilink
          arrow-up
          1
          ·
          1 年前

          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
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 350 users / day
  • 3.06K users / week
  • 7.35K users / month
  • 12K users / 6 months
  • 327 local subscribers
  • 32.9K subscribers
  • 1.95K Posts
  • 71.8K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.20
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org