From 6d87f98c357982310d8d1463142799bdd98a5176 Mon Sep 17 00:00:00 2001 From: Michael Heidelberger Date: Thu, 19 Apr 2018 11:57:22 -0500 Subject: [PATCH] Beautification of code output --- ip-api.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ip-api.py b/ip-api.py index 7660f5a..a2e8a4d 100644 --- a/ip-api.py +++ b/ip-api.py @@ -11,10 +11,10 @@ def query_api(host): json_data = requests.get(main_api + x).json() # Print out wanted JSON data formatted nicely print('\nCity\State: {}, {}\n' - 'Country: {}\n' - 'ISP: {}\n' - 'IP: {}\n' - 'MX: {}'.format( + 'Country: {}\n' + 'ISP: {}\n' + 'IP: {}\n' + 'MX: {}'.format( json_data['city'], json_data['regionName'], json_data['country'],