Box the compass: Difference between revisions

m (→‎{{header|Tcl}}: prettier!)
Line 241:
=={{header|Python}}==
<lang python>majors = 'north east south west'.split()
majors *= majors + majors2 # no need for modulo 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]
Anonymous user