# The original wmata file wasn't that good. This one will
# leverage argparse library for better user experience

import argparse
from time import strftime, strptime

parser = argparse.ArgumentParser(description='Get metro departure times')

parser.add_argument('start_time', metavar='time', nargs='?', default=strftime('%I:%M'),
    help='The time at which you depart for the metro')

@@ -158,16 +158,320 @@
 strptime
+%0Afrom datetime import datetime%0A%0Adef valid_time(time):%0A    valid_formats = '%25H%25M', '%25H:%25M', '%25H'%0A    try:%0A        for format in valid_formats:%0A            datetime.strptime(time, format)%0A    except ValueError:%0A        raise argparse.ArgumentTypeError('%7B%7D is not a valid time'.format(time))%0A    return time
 %0A%0Aparser
@@ -520,16 +520,22 @@
 t metro 
+train 
 departur
@@ -636,16 +636,33 @@
 M'),%0A   
+ type=valid_time,
  help='T
@@ -705,8 +705,59 @@
 metro')%0A
+%0Aargs = parser.parse_args()%0Aprint(args.start_time)%0A

use datetime module to validate time