Artificial intelligent assistant

import foo.bar as barとfrom foo import barに違いはあるのか PyTorch PyTorch import torch import torch.nn as nn # ... `torch.nn` `nn` import torch from torch import nn from `import foo.bar as bar` `from foo import bar`




$ python3
Python 3.7.5rc1 (default, Oct 8 2019, 16:47:45)
[GCC 9.2.1 20191008] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> import os.getcwd as getcwd
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'os.getcwd'; 'os' is not a package
>>> from os import getcwd
>>> getcwd()
'/home/nemo'


`os.getcwd()`
`os.path` `import foo.bar as bar`


>>> import os.path as path
>>> path

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 72b0154f67e28c91c67ec22d31e472a3