use fourth element of version as a key to get the value from mapping dictionary, append to it fourth element of version converted to string, substitute it for sub.
sub = mapping [ version [ 3 ] ] + str ( version [ 4 ] )