Motor COntrol Arduino Python

Can I control the code on arduino using python is there an api or library

What does "control the code" mean?

This Simple Python - Arduino demo should help you get started.

...R