def first_non_none_response(responses, default=None):
 for response in responses:
  if (response[1] is not None):
   return response[1]
 return default

def first_non_none_response ( responses , default = None ) : for response in responses : if ( response [ 1 ] is not None ) : return response [ 1 ] return default
find first non none response in a list of tuples .