You are viewing a single comment's thread. Return to all comments →
import re pattern = r'#[0-9A-Fa-f]{6}\b|#[0-9A-Fa-f]{3}\b' n = int(input().strip()) inside = False for _ in range(n): t = input() if "{" in t: inside = True elif "}" in t: inside = False elif inside: [print(x) for x in re.findall(pattern, t)]
Seems like cookies are disabled on this browser, please enable them to open this website
Hex Color Code
You are viewing a single comment's thread. Return to all comments →