Answers for "hex color code hackerrank solution"

0

hex color code hackerrank solution

# Hex Color Code in Python - Hacker Rank Solution
# Python 3
# Enter your code here. Read input from STDIN. Print output to STDOUT
# Hex Color Code in Python - Hacker Rank Solution START
import re

T = int(input())
in_css = False
for _ in range(T):
    s = input()
    if '{' in s:
        in_css = True
    elif '}' in s:
        in_css = False
    elif in_css:
        for color in re.findall('#[0-9a-fA-F]{3,6}', s):
            print(color)
# Hex Color Code in Python - Hacker Rank Solution END
Posted by: Guest on August-10-2021

Code answers related to "hex color code hackerrank solution"

Python Answers by Framework

Browse Popular Code Answers by Language