require

How to do multiple imports in Python?

How to do multiple imports in Python? Question: In Ruby, instead of repeating the "require" (the "import" in Python) word lots of times, I do %w{lib1 lib2 lib3 lib4 lib5}.each { |x| require x } So it iterates over the set of "libs" and "require" (import) each one of them. Now I’m writing a Python …

Total answers: 7