Box the compass: Difference between revisions

Content added Content deleted
(Whoops, wrong sequence of headings)
Line 23:
=={{header|Python}}==
<lang python>majors = 'north east south west'.split()
majors = majors + majors # no need for modulemodulo later
quarter1 = 'N,N by E,N-NE,NE by N,NE,NE by E,E-NE,E by N'.split(',')
quarter2 = [p.replace('NE','EN') for p in quarter1]