From 86f1e20620f3acc15e30b400119b9c9b8c161f97 Mon Sep 17 00:00:00 2001 From: Paulo Custodio Date: Fri, 19 Feb 2021 20:09:30 +0000 Subject: Add missing comment line --- challenge-100/paulo-custodio/python/ch-1.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'challenge-100/paulo-custodio/python/ch-1.py') diff --git a/challenge-100/paulo-custodio/python/ch-1.py b/challenge-100/paulo-custodio/python/ch-1.py index 12fad2210b..863b39f2ba 100644 --- a/challenge-100/paulo-custodio/python/ch-1.py +++ b/challenge-100/paulo-custodio/python/ch-1.py @@ -1,7 +1,5 @@ #!/usr/bin/env python -# Challenge 100 -# # TASK #1 > Fun Time # Submitted by: Mohammad S Anwar # You are given a time (12 hour / 24 hour). -- cgit From 798c5692eb4c43474a1ba230bb93f9fdfc3fd311 Mon Sep 17 00:00:00 2001 From: Paulo Custodio Date: Fri, 19 Feb 2021 20:10:38 +0000 Subject: Remove tabs --- challenge-100/paulo-custodio/python/ch-1.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'challenge-100/paulo-custodio/python/ch-1.py') diff --git a/challenge-100/paulo-custodio/python/ch-1.py b/challenge-100/paulo-custodio/python/ch-1.py index 863b39f2ba..818624d76b 100644 --- a/challenge-100/paulo-custodio/python/ch-1.py +++ b/challenge-100/paulo-custodio/python/ch-1.py @@ -3,12 +3,12 @@ # TASK #1 > Fun Time # Submitted by: Mohammad S Anwar # You are given a time (12 hour / 24 hour). -# +# # Write a script to convert the given time from 12 hour format to 24 hour format # and vice versa. -# +# # Ideally we expect a one-liner. -# +# # Example 1: # Input: 05:15 pm or 05:15pm # Output: 17:15 @@ -21,8 +21,8 @@ import sys; import datetime; if re.search(r'am|pm', sys.argv[1], re.I): - t = datetime.datetime.strptime(sys.argv[1], "%I:%M%p") - print(t.strftime("%H:%M")) + t = datetime.datetime.strptime(sys.argv[1], "%I:%M%p") + print(t.strftime("%H:%M")) else: - t = datetime.datetime.strptime(sys.argv[1], "%H:%M") - print(t.strftime("%I:%M%p").lower()) + t = datetime.datetime.strptime(sys.argv[1], "%H:%M") + print(t.strftime("%I:%M%p").lower()) -- cgit