fichier python pour brython 1

fichier python pour brython

from browser import document
document <= "Salut !"

Here is what the above code is Doing:
1. It imports the document object from the browser module.
2. It adds the string "Salut !" to the document object.

The document object is a special object that represents the web page.

The document object has a special method called __lshift__.
This method is called when you use the << operator. The __lshift__ method adds the string "Salut !" to the web page. The web page is displayed in the browser.

Similar Posts