No Hello World | import __hello__ does not work anymore | #python #programming #coding #shorts

preview_player
Показать описание
No Hello World | import __hello__ does not work anymore | #python #programming #coding #shorts

The easter egg in the Python __hello__ module was fixed in Python 3.11, so importing __hello__ no longer prints "Hello World!" by default. To get the same effect, you now need to call the module's main method:

import __hello__
__hello__.main()

If you want to print "Hello World!" without calling the main method, you can do so by importing the module and then accessing the _hello attribute:
import __hello__
print(__hello__._hello)

__hello__ is a frozen module intended as a test case for frozen module support. Its source code is automatically generated by the Python freeze utility
Рекомендации по теме
welcome to shbcf.ru