How is this funny? 8 Upvotes at current writing???
It’s kind of funny because it looks like it is nonsense dreamt up by a non-programmer. But it actually works.
I thought it was poking fun at the tutorial saying instead of learning to code, import a library from someone who knows how to code.
That’s what libraries are for. I’m no security expert and the sensible thing to do is using a library instead of taking a class.
It’s basically import antigravity
Time travel is a prerequisite but don’t worry, you can just
from __future__ import antigravity
It’s literally this comic, five years and a research team later.
Because this example isn’t really programming, it’s just calling an existing library. Which is the big joke about Python.
It’s funny because
from apps import facebook-killer as fb
fb.start()
// 3 million seed investment
Hahaha now code-golf it. One line FTW!
remove(Image.open(‘cl.jpeg’)).save(‘output.png’)
If I find this in production I’m whipping your ballsack till you change it back.
https://codegolf.stackexchange.com/
Enjoy a new rabbit hole to dive down
You never heard of code Golf before? It’s usually programming challenges where the goal is to use the smallest number of source code characters possible.
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!
That reminds me back when some time ago, I was tired of dealing with sketchy, and often broken, websites and programs for downloading videos from Youtube. I figured these sorts of programs must be doing something along the lines of downloading the Youtube page, parsing through the massive pile of HTML and Javascript to find the stream, and then saving that to a video file. That seemed like something I could do myself with Python, so I set out to see if I could figure out how to do it.
A few minutes and a couple of web searches later, I discovered that someone else had figured that all out already and I just needed to do “pip install pytube”.
There’s a python library for everything