def get_semver_version(version):
 main = u'.'.join((str(x) for x in version[:3]))
 sub = u''
 if (version[3] != u'final'):
  sub = u'-{}.{}'.format(*version[3:])
 return (main + sub)

def get_semver_version ( version ) : main = u'.' . join ( ( str ( x ) for x in version [ : 3 ] ) ) sub = u'' if ( version [ 3 ] != u'final' ) : sub = u'-{}.{}' . format ( * version [ 3 : ] ) return ( main + sub )
returns the semver version (x .