def is_valid_address (s):
try:<EOL><INDENT>pairs = s.split ("<STR_LIT::>")<EOL>if len (pairs) != <NUM_LIT:6>: return False<EOL>if not all(<NUM_LIT:0> <= int(b, <NUM_LIT:16>) <= <NUM_LIT:255> for b in pairs): return False<EOL><DEDENT>except:<EOL><INDENT>return False<EOL><DEDENT>return True<EOL>
returns True if address is a valid Bluetooth address

valid address are always strings of the form XX:XX:XX:XX:XX:XX
where X is a hexadecimal character.  For example,
    01:23:45:67:89:AB is a valid address, but
    IN:VA:LI:DA:DD:RE is not