Changed .has_key() to using in.

Fix pep8 - W601 - .has_key() deprecated; use in