Before logging a configuration, replace the value of every key whose name contains password, secret,
token or key (case-insensitive) with "***". The structure can nest dictionaries and lists to any
depth; mask at every level. A masked key's value is replaced entirely, even if it is a dictionary.
Return a new structure; don't modify the input.
Implement mask. Input: data: dict | list | scalar. Returns: same shape with secrets masked.
def mask(data):
return data
Run executes the public tests. Submit grades against public and hidden tests.
Before logging a configuration, replace the value of every key whose name contains password, secret,
token or key (case-insensitive) with "***". The structure can nest dictionaries and lists to any
depth; mask at every level. A masked key's value is replaced entirely, even if it is a dictionary.
Return a new structure; don't modify the input.
Implement mask. Input: data: dict | list | scalar. Returns: same shape with secrets masked.
def mask(data):
return data
Run executes the public tests. Submit grades against public and hidden tests.