code: def versionString(version):
      
      ver = list(map(str, version))
      numbers, rest = ver[:2 if ver[2] == '0' else 3], ver[3:]
      return '.'.join(numbers) + '-'.join(rest)
docs: Create version string.
  
      For a sequence containing version information such as (2, 0, 0, 'pre'),
      this returns a printable string such as '2.0pre'.
      The micro version number is only excluded from the string if it is zero.