0Pricing
Mojo Academy · Lesson

Calling Python Functions

Invoke Python code and read results.

From Import to Action

Importing a module is just step one. The real payoff is calling its functions and getting results back into your Mojo program.

Call With Dots

Use the module handle and dot syntax to call a function, exactly like in Python: module name, dot, function, parentheses.

var root = math.sqrt(16)

All lessons in this course

  1. Importing a Python Module
  2. Calling Python Functions
  3. Moving Data Across the Bridge
  4. When to Use Python Interop
← Back to Mojo Academy