def versionString(version):
    """Convert the given version tuple to a string.

    For a sequence containing version information such as (2, 0, 0, 'b'),
    this returns a printable string such as '2.0b'.
    The micro version number is excluded from the string if it is zero.
    """
    ver = list(map(str, version))
    ver, suffix = ver[:3], '.'.join(ver[3:])
    if len(ver) > 2 and ver[2] == '0':
        ver = ver[:2]
    return '.'.join(ver) + suffix