When I'm programming in Python and I need to import multiple modules, I usually do I like this:
import random, time, matplotlib, cheese, doge
As per PEP-8 (The Style Guide for Python Code)
Imports should usually be on separate lines, for e.g Yes: import os import sys No: import sys, os It's okay to say this though: from subprocess import Popen, PIPE
To answer your question - both would work fine, but one is not conformant with the PEP8 guidelines.