Syntax

MicroPython implements Python 3. You write indentation, functions, classes, exceptions, generators, closures and async/await the same way. The gaps are in the library and in a few implementation limits, not in the look of the language.

What you can rely on

Usual differences

TopicWhat happens
Standard libraryA subset. json, re, struct, time, os, sys are there; pathlib and desktop-only modules are not.
Floating pointOptional, and left out of the smallest builds. Most microcontroller builds use single precision (32-bit) floats; the unix, Windows and WebAssembly builds use double precision.
TracebacksShow the file and line number but not the line of source. Builds below the extra-features level leave out line numbers.
Multiple inheritanceSupported, but methods are looked up depth first rather than in CPython’s order, and super() calls only one of the parents.
eval / execPresent on most builds; can be compiled out. Code run this way sees global names but not the caller’s local variables.
Overriding builtinsAssigning to a name in the builtins module works on builds at the extra-features level and above.
Filesystemopen() talks to the on-board flash (or an SD card), not your laptop disk, unless you are on the unix port.

The maintained list is CPython differences in the official docs.

Identifiers you will see only here

const() from micropython declares a constant the compiler can substitute wherever the name is used. @micropython.native and @micropython.viper emit machine code for a function. mem_info() and alloc_emergency_exception_buf() are runtime knobs. These are not CPython.