Why does the following work:
from itertools import chain
but the following does not?
import itertools.chain as chain
                The import foo.bar syntax can only be used to import a module from a package, not an object in a module.  from foo import bar can be used to import a module from a package or an object from a module.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With