PY3: avoid that strings are considered as iterables
PEP8: minor
PEP8: minor
use "with" statement when opening file
use "with" statement when opening file