Compare config equivalence

Write codeEasy11 min

Your task

Two engineers swear their laptops run "the same settings". Decide it. You get both files as lists of lines. Cosmetic differences must not matter: ordering of lines, spacing around the first "=", blank lines, and "#" comment lines are all irrelevant, and when a name is assigned repeatedly only its final assignment speaks. A line containing no "=" at all is noise and speaks for nothing. Return true exactly when both files define the same set of names with the same final values.

Examples

same_config(a: list[str], b: list[str]) -> bool
Example 1
Inputsame_config(["a=1", "b = 2"], ["b=2", "a=1", "a=1"])
OutputTrue