Is there are Python equivalent of Perl's __DATA__ filehandle?
Is there are Python equivalent of Perl's __DATA__ filehandle? Question: In Perl I often read data in from the filehandle __DATA__ at the end of the script: while (<DATA>) { chomp; say; } __DATA__ line1 line2 I find this quicker for testing code etc than reading in a file, as it means I can edit …