r/AskProgramming • • Sep 28 '26

cursed python hello world

Is there any way to make this code wok in python?

"hello"(print)

This is just a joke and i do not care how cursed of a setup this requires.
0 Upvotes

14 comments sorted by

View all comments

10

u/AuthurAndersson Sep 28 '26

pip install forbiddenfruit

from forbiddenfruit import curse

curse(str, "__call__", lambda self, func: func(self))

"hello"(print)

4

u/ayassin02 Sep 28 '26

I thought you were trolling but that’s actually a thing lmao

1

u/abd53 Sep 28 '26

Unfortunately, it doesn't work.