0
Import Multiple Modules
Is it possible to import multiple modules in one line of code like: import math, random or do you have to write: import math import random
2 ответов
+ 2
Did some testing and discovered that either listing modules after a single import or writing import for each module on its own line will have the same affect. Cool!
+ 1
Yes you can import multiple modules in a single line of code separated with commas.
It is always a good practice to test them in a real time python.