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
- Importing a Python Module
- Calling Python Functions
- Moving Data Across the Bridge
- When to Use Python Interop