1

I want to do something like this

from folder import module_1, module_2 as m1, m2

instead of:

from folder import module_1 as m1
from folder import module_2 as m2

Just for the sake of practicality. How can I do it?

Note: it's not like this question because I want to import different modules

Lucas Hattori
  • 87
  • 1
  • 8

1 Answers1

2

Yes. The syntax was little off in the first block

from folder import module_1 as m1, module_2 as m2
Lucas Hattori
  • 87
  • 1
  • 8
  • 1
    Actually, it's mentioned in [docs](https://docs.python.org/3/reference/simple_stmts.html#the-import-statement)... – Olvin Roght Jul 10 '20 at 19:58