Google interview question

Implement the "cd" command in Python.