main.py#
This is Exercise 1 of the Micro Python Tutorial.
The file (also sometimes called a "script") named main.py is special in MicroPython, in the sense that when you power-on the device and/or press the reset button, the contents of the main.py file are passed to the MicroPython interpreter and the program contained within main.py is executed. It's the entry point for running any application in Python.
main.py# this is a comment
print('hello world.') print("hello again.") # you can use single or double quotes
See also: The REPL
Previous: MicroPython Tutorial: home page
Next: MicroPython Tutorial Exercise 2: functions