You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
def extract_template(path_string, value_dict):
|
|
template = path_string
|
|
for key, value in value_dict.items():
|
|
if str(value) in template:
|
|
template = template.replace(str(value), f'<{key}>')
|
|
return template
|