Rating:

* call `help()` to get interactive shell
* search for some python command (i used `exec`)
* `help()` opens the manual page for `exec` with `more`
* now that you are in `more`, you can just run bash command with ! in front of the command(like `!ls`)

therefore, to get the flag:
* `help()`
* `exec`
* `!ls` (we can see a file called `flag.txt` and the python script itselfs)
* `!cat flag.txt` `DawgCTF{bUt_iT'5_c@ll3d_1nput}`