• + 0 comments

    Could the challenge get any easier‽ 😆 This was easier than the earlier challenges, yet it was worth more points, 30 instead of 20.

    Thank you, HackerRank! ❤️

    import re, sys
    
    # We don't even CARE about ignoring the first
    # line of input containing the number N.  It
    # won't match the pattern anyway.
    print('\n'.join(m[1] for m in re.finditer(
      r'[:,][^#\n]*(#([0-9A-Fa-f]{3}){1,2})',
      sys.stdin.read())))