
import re
def is_valid_hex_code(txt):
  return bool(re.match(r'\A#[a-fA-F0-9]{6}\Z', txt))


3c477a6161eb143ef4f59d8c85784d3322cadf98
<mask token>

<mask token>


def is_valid_hex_code(txt):
    return bool(re.match('\\A#[a-fA-F0-9]{6}\\Z', txt))

import re


def is_valid_hex_code(txt):
    return bool(re.match('\\A#[a-fA-F0-9]{6}\\Z', txt))


import re
def is_valid_hex_code(txt):
  return bool(re.match(r'\A#[a-fA-F0-9]{6}\Z', txt))

