def _split_host_and_port(servers):
    """Convert python-memcached based server strings to pymemcache's one.

    - python-memcached: ['127.0.0.1:11211', ...] or ['127.0.0.1', ...]
    - pymemcache: [('127.0.0.1', 11211), ...]
    """
    _host_and_port_list = []
    for server in servers:
        connection_info = server.split(':')
        if len(connection_info) == 1:
            _host_and_port_list.append(
                (connection_info[0], 11211))
        elif len(connection_info) == 2:
            _host_and_port_list.append(
                (connection_info[0], int(connection_info[1])))
    return _host_and_port_list