Can you have two different import statements in a single code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can you have two different import statements in a single code?

24th Aug 2021, 6:59 AM
Umar Akorede
Umar Akorede - avatar
2 Answers
+ 4
sure, you can do, for example, import numpy import pandas in the same script.
24th Aug 2021, 7:14 AM
Lisa
Lisa - avatar
+ 1
But multiple imports on one line of code is not PEP 8 friendly.
24th Aug 2021, 8:40 PM
Delorme