• Björn@swg-empire.de
      link
      fedilink
      arrow-up
      2
      ·
      2 years ago

      It’s kind of funny because it looks like it is nonsense dreamt up by a non-programmer. But it actually works.

    • CanadaPlus@lemmy.sdf.org
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      2 years ago

      Because this example isn’t really programming, it’s just calling an existing library. Which is the big joke about Python.

    • Lupec@lemm.ee
      link
      fedilink
      arrow-up
      0
      ·
      2 years ago

      My best guess is it’s a play at the usual “all you do in python is import libraries without knowing how they work lololol” dig but yeah, I don’t find it particularly funny either

  • adr1an@programming.dev
    link
    fedilink
    arrow-up
    2
    arrow-down
    1
    ·
    2 years ago

    This is exactly why we love Python (and other languages with rich package ecosystem, even when only on their niche usage cases). You can build upon other people’s knowledge and effort to do cool things efficiently and effectively!

  • qx128@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    2 years ago

    Hahaha now code-golf it. One line FTW!

    remove(Image.open(‘cl.jpeg’)).save(‘output.png’)