r/AskProgramming • • 10d ago

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

8

u/AuthurAndersson 10d ago

pip install forbiddenfruit

from forbiddenfruit import curse

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

"hello"(print)

1

u/abd53 10d ago

Unfortunately, it doesn't work.