python keep the last 3 folders code example Example: which folder python os import os cwd = os.getcwd()