(s)
Parse time spec with optional s/m/h/d/w suffix
Parse time spec with optional s/m/h/d/w suffix
Parse time spec with optional s / m / h / d / w suffix
def parse_time(s):
    """
        Parse time spec with optional s/m/h/d/w suffix
    """
    if s[-1].lower() in secs:
        return int(s[:-1]) * secs[s[-1].lower()]
    else:
        return int(s)
def parse_time ( s ) : if s [ - 1 ] . lower ( ) in secs : return int ( s [ : - 1 ] ) * secs [ s [ - 1 ] . lower ( ) ] else : return int ( s )