GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — fluent_python_code/02-array-seq/metro_lat_long.py at master · sdqscript/fluent_python_code Expand file tree/ Copy pathmetro_lat_long.pyMore file actions 13 lines (12 loc) · 561 Bytes / Copy pathmetro_lat_long.pyFile metadata and controls13 lines (12 loc) · 561 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 metro_areas = [ ('Tokyo', 'JP', 36.933, (35.689722, 139.691667)), # <1> ('Delhi NCR', 'IN', 21.935, (28.613889, 77.208889)), ('Mexico City', 'MX', 20.142, (19.433333, -99.133333)), ('New York-Newark', 'US', 20.104, (40.808611, -74.020386)), ('Sao Paulo', 'BR', 19.649, (-23.547778, -46.635833)), ] print('{:15} | {:^9} | {:^9}'.format('', 'lat.', 'long.')) fmt = '{:15} | {:9.4f} | {:9.4f}' for name, cc, pop, (latitude, longitude) in metro_areas: # <2> if longitude <= 0: # <3> print(fmt.format(name, latitude, longitude)) |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |