(Note that if using this approach for pasting dataframes into StackOverflow, use CSV and not TSV, see here.)
Without need for a separate file; although list could could be in separate file, and then just not use StringIO. Handy for toy code and keeping examples compact and as one file.
IMPORTANT THING IS TO HAVE import SOURCE MATCH VERSION OF PYTHON, check with import sys;print (sys.version). Or use provided approach compatible with both Python 2 and 3.