
Mojo basics
Mojo syntax resembles Python at first glance. The use of indents instead of braces to delineate blocks, common keywords (def for functions, etc.), how control flow is handled (if/else/while/for), exceptions, and type annotations will all be familiar to Python developers.
Where Mojo breaks with Python, and stakes out its own territory, starts with how values are handled in variables. Variables have strong types, either assigned through annotations or inferred automatically from their first assignment. If you set a to equal 1, you cannot set it to "Greetings earthlings" later. (In Python, the objects themselves are strongly typed but the names used to refer to them do not have types.)
Mojo further breaks from Python by adding a concept found in Rust: ownership of values. Instead of runtime garbage collection, Mojo uses ownership to track the lifetimes of objects at compile time.
To indicate you want to transfer ownership of a value, you use the “transfer sigil” syntax:

