def get_main_version(version=None):
 version = get_complete_version(version)
 parts = (2 if (version[2] == 0) else 3)
 return '.'.join((str(x) for x in version[:parts]))

def get_main_version ( version = None ) : version = get_complete_version ( version ) parts = ( 2 if ( version [ 2 ] == 0 ) else 3 ) return '.' . join ( ( str ( x ) for x in version [ : parts ] ) )
returns main version from version .