0 votes
in Python by
Print the file path of imported modules

1 Answer

0 votes
by
import os;

import socket;

print(os)

print(socket)

Output:

<module 'os' from '/usr/lib/python3.5/os.py'>

<module 'socket' from '/usr/lib/python3.5/socket.py'>

Related questions

0 votes
asked May 17, 2020 in Python by sharadyadav1986
+1 vote
asked Feb 15, 2021 in Python by SakshiSharma
...