Every single branch below here features `line.split("=")[1]`. Might make things tidier if you save that value just before you enter the if/elif bit?