def join(values, separator=',', lastSeparator='and'):
    """
    Helper method to print a list of values
    [1,2,3] -> '1, 2 and 3'
    """
    values = [str(x) for x in values]
    if len(values) < 1:
        return ""
    elif len(values) is 1:
        return values[0]
    else:
        separator = separator % '%s '
        return ' '.join([separator.join(values[:-1]),
                         lastSeparator, values[-1]])
dataset/ETHPy150Open aws/aws-cli/awscli/customizations/emr/emrutils.py/join/swapped operands of `%`