The cost of a joke

Artificial (Un)intelligence —

Token go boom

Some hot air baloons drifting through the sky. The one in the foreground is in the form of an upside down slightly uncomfortable looking cartoon character

Hear me out, this is science.

I prompted models from a bunch of providers with «Write a funny Python one-liner».

The idea here is to build objective model evaluation a simple way to show how even benign prompts explode in used tokens.

Keep in mind that, depending on the tokenizer, the prompt equals around 7–10 input tokens. The delta between these and the amount shown in the input token column is stuff the model made up as it «reasons» through the question.

Models that support reasoning had it set to high.

Costs have been calculated using OpenCode Zen or OpenRouter.

Python one-liner jokes by model, with token usage and cost
ModelInput tokensOutput tokensCostOutput
DeepSeek v4 Pro14,54168$0.803

Funny Python one-liner:
print([n for n in range(2, 100) for f in range(2, int(n**0.5)+1) if n % f == 0] or "nobody gets out alive")
Or the classic:
import this

GLM 5.212,813631$0.206

print("I'd tell you a Python joke, but you'd probably mess up the indentation")

GLM 5.313,899135$0.201

print('\n'.join(f"{'buy' if i%3 and i%5 else 'fizz' if i%3==0 else 'buy'}" for i in range(1,101)))
FizzBuzz for adults: every multiple of 3 says "fizz", everything else says "buy". More classic option:
import this
— zen of Python, only joke shipped in stdlib.

GPT 5.5 Pro28,674498$0.966

print("I told Python a joke about indentation... it didn't get the block.")

GPT 5.528,726657$0.896

print("I put the 'fun' in function, mostly by removing the tests.")

GPT-6 Astra43,792396$0.2577

print("I've got 99 problems, but thanks to zero-indexing, the last one is 98.")

Kimi K 2.613,53875$0.66

import __hello__ # The only import that says hi then ghosts you, just like my dating life

Kimi K 2.7 Code14,3621,184$0.183

print(''.join(['🐍' if i % 2 else '💤' for i in range(10)])) # 🐍💤🐍💤🐍💤🐍💤🐍💤
Or, if you prefer meta-humor:
__import__('antigravity') # Python's official sense of humor (try it in your terminal)

Kimi K 313,499300$0.517

Here one:
print("Why do Python programmers wear glasses? Because they can't C")
Bonus, nerdy:
import antigravity
Run second one. Opens xkcd comic. Real easter egg.

Minimax M2.514,567122$0.45

import antigravity # opens a web browser showing the famous xkcd comic
Or for something that actually runs:
print(lambda: print(lambda: print(lambda: print("Python")))()) # the lambda that keeps on lambdating

Minimax M2.714,56569$0.004

import this

Minimax M313,0064,388$0.87

print(f"0.1 + 0.2 = {0.1 + 0.2}, but she wanted exactly {0.3}. 🐍💔")

Mistral Medium 3.510,090689$0.203

print(f"The answer to life, the universe, and everything is {6*9}")

Opus 4.616,31724$0.1026

print(' '.join(['spam'] * 100 + ['eggs']))

Opus 4.722,64386$0.1437

print((lambda f: f(f))(lambda f: lambda n: 1 if n < 2 else n * f(f)(n-1))(5), "... I computed a factorial recursively in a lambda because regular functions are for people with friends.")

Opus 4.819,491116$0.1247

import antigravity # opens https://xkcd.com/353 in your browser because Python literally has a joke built in
Or a self-deprecating classic:
print("This code has no bugs"); # narrator: it had bugs

Opus 521,247174$0.137

print("\n".join(f"{n}: {'FizzBuzz'[n%3*4:8-n%5*4] or n}" for n in range(1,16)))
Cursed FizzBuzz. Slices "FizzBuzz" — string index math does the branching. Nobody on your team will forgive you.

Qwen 3.6 Plus15,08257$0.96

print("I'm not lazy, I'm just on energy-saving mode." or exit())

Sonnet 519,555399$0.529

Here's one:
print(''.join(chr(ord(c)-1) for c in "Ifmmp-!xpsme"))
This decodes a Caesar-shifted string to print Hello, world! — technically correct, needlessly convoluted, and exactly the kind of one-liner that gets you side-eyed in code review.
Or if you prefer chaos in the numeric variety:
print(*[i for i in range(1,101) if not print(i,end=' ') and False] or [])
(That one's a joke about a "joke" — it doesn't even work right, which is the real punchline: someone tried to jam a for-loop print into a one-liner and immediately regretted it.)

Depressing. But such is science.

0 Webmentions

0 Likes

    0 Reposts

      Using Webmentions and webmention.io.

      Title Image

      Matt Busse on Unsplash

      Filed under

      Changelog