Issue
In python you can import multiple libraries at once and also you can import a specific function from a library like below:
import sys, os, csv
from shutil import copyfile
Is there a way to combine this?
For example, like this:
import sys, os, csv, from shutil import copyfile
Note, i'm aware that we can use
shutil.copyfile
, but I would like to usecopyFile
withoutshutil
Solution
If you NEED it in one line, you could use a semicolon
Such as:
import sys, os, csv; from shutil import copyfile
Answered By - Amster Plays
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.