How to automate website login that uses 2-step verification using python selenium?

  authentication, python, selenium

I’m using python selenium to automate user login for a website. However, this specific website uses a 2-step authentication when logging in: After clicking login, it then sends a code to your email address, which you have to enter into the website in order to authenticate. Any ideas what I should do or how I can access that code using python selenium?

Source: Python Questions