Start the Python interpreter with an import statement
Use an alias: alias 3=python3.
Use the PYTHONSTARTUP environment variable: import your most frequently used modules whether or not they'd actually get used in this session.
If you insist on doing it your way, I've made an "improvement" over your code:

function import
{
    python3 -ic "import $*"
}

function from
{
    args=$*
    python3 -ic "from ${args%import*} import ${args#*import}"
}


This doesn't guard against anything, nor should you need to.

Hardened (?) version (use at your own risk):

function import
{
    args=$(awk -v q="'" -v ORS=',' '{for(i=1; i&lt;=NF; i++) print q $i q}' &lt;&lt;&lt; "${@/,/ }")
    python3 -ic "for module in eval("\""[$args]"\""): exec(f'import {module}')"
}



Feel free to use any combination of the 3 methods.