Rename contains to check (Python)