Yes, you can modify the __all__ attribute of a module after importing it. However, this will not have any effect on the names that have already been imported. Only subsequent imports will reflect the changes made to __all__.