GIS feature labeling and removal of None or Empty fields A working label expression for ArcGIS 10.3. I was using dictionary key:values but sometimes the keys would have the same value so my items were 'disappearing' out of the dictionary. Now I use this simple counter to group my values from a list (0,1) (2,3) (4,5). I think the if functions might be able to be combined, as well as perhaps setting the list[i*2] and list[(i*2)+1] to variables instead of repeating them 3 times.

def FindLabel ( [Elevation] , [Out_Elev] , [Out_Loc] , [In1_Elev] , [In1_Loc] , [In2_Elev] , [In2_Loc] , [In3_Elev] , [In3_Loc]  ):
  list = [Out_Elev],[Out_Loc],[In1_Elev],[In1_Loc],[In2_Elev],[In2_Loc],[In3_Elev],[In3_Loc]
  x = [Elevation] + " Top"
  for i in range(len(list)/2): 
    if list[i*2] is not None:
      if list[i*2].strip() != "":
       if list[(i*2)+1] is not None:
         if list[(i*2)+1].strip() !="":
           x = x  + "\n" + "(" + str(list[i*2]) + ": " + str(list[(i*2)+1]) + ")"
  return x
You can consolidate the body of this quite a bit.  First, I'd make list[i*2] and list[i*2+1] into variables, probably

first_element = list[i*2]
second_element = list[i*2+1]


Then you can clean up the if statements as well

if first_element and first_element.strip() and second_element and second_element.strip():


However, that makes it clear that what you're doing is the same for both.  I'd write a little helper function

def validate_element(element):
    return element and element.strip()

if validate_element(first_element) and validate_element(second_element):


You should also use a format string and string.join instead of concatenation

lines = ["{} Top".format([Elevation]]

for i in range(len(list)/2):
    first_element = list[i*2]
    second_element = list[i*2+1]
    if validate_element(first_element) and validate_element(second_element):
        lines.append("({}:{})".format(first_element, second_element))

return '\n'.join(lines)


You could probably turn this into a list comprehension if you wanted to, but that probably isn't worth the effort and ugliness that would ensue.

Your names in general are pretty bad - list is especially horrific because you're now masking a builtin function - you can no longer use the list constructor.  Try to use descriptive names to actually describe what the values represent.