Skip to content

Imports

Rajesh Gautam edited this page Jun 12, 2026 · 1 revision

Imports

Importing a Package

import{"packagename", nickname}\

Then use it as nickname.method{...}.

Example — math

import{"math", m}\

pcAI

pcAI is built-in — no import needed. It is always available.

If you want to use it under a different name:

import{"pcAI", mybot}\
mybot.ask{"Hello!"}\

This creates a fresh pcAI instance under the nickname mybot.

Any Python Package

You can import any Python standard library package or any pip-installed package:

import{"random", r}\
import{"os", operating_system}\
import{"json", j}\

Clone this wiki locally