def getVersion(self, agent):
        version_end_chars = ['like', ';', ')']
        if (not 'CPU iPhone OS' in agent) and (not agent in 'CPU OS'):
            return 'X'
        part = agent.partition('OS')[2].strip()
        for c in version_end_chars:
            if c in part:
                version = 'iOS ' + part.partition(c)[0].strip()
                break
        return version.replace('_', '.')
dataset/ETHPy150Open uwdata/termite-data-server/web2py/gluon/contrib/user_agent_parser.py/iPhone.getVersion/swapped operands of `in`