0
Python module
Just curiosity. I've imported all functions in random module using from random import * Now how can I delete all those functions at once ?
5 Réponses
+ 1
If you use the * syntax, you import all the names one by one into your globals.
So if you want to erase them from the globals, you'd have to use del on each one of them.
If instead you imported random as one item (import random), you can just write:
del random
Out of curiosity: Why do you feel you need to do this?
+ 1
HonFu I imported a module with *
And finally realized I can't delete all functions at once btw thanks.
0
What do you mean by delete all the functions? As in remove them from your program because you don't want to use them anymore?
0
Yup. I imported them in the python console. Used it and done with it. Now I wanna delete it.
0
I haven't tried it and I haven't even spent time reading the whole thing. But you can try this
https://mail.python.org/pipermail/tutor/2006-August/048596.html