Perl allows me to use the __DATA__ token in a script to mark the start of a data block. I can read the data using the DATA filehandle. What\'s the Pythonic wa
It depends on your data, but dict literals and multi-line strings are both really good ways.
state_abbr = {
'MA': 'Massachusetts',
'MI': 'Michigan',
'MS': 'Mississippi',
'MN': 'Minnesota',
'MO': 'Missouri',
}
gettysburg = """
Four score and seven years ago,
our fathers brought forth on this continent
a new nation,
conceived in liberty
and dedicated to the proposition
that all men are created equal.
"""