Fix an equal comparaison in if condition

separate libs in import as mentioned in PEP8