In Python (I use Spyder), is there any way to unlink all the libraries (packages) and clear all data?
In R, we have rm(list=ls())
. I wonder if there is an equivalent in Python.
Python:取消链接所有库并删除所有数据
评论
请
登录后发表观点
-
try this: How to unimport a python module which is already imported?
>>> import requests >>> dir() ['__builtins__', '__doc__', '__name__', '__package__', 'readline', 'requests', 'rlcompleter'] >>> del requests >>> dir() ['__builtins__', '__doc__', '__name__', '__package__', 'readline', 'rlcompleter'] >>>