Try this (edited per @alpha-beta-soup comment):
def myFunction (inter, prop, patch, shp, nat, edge):
myList = [inter, prop, patch, shp, nat, edge]
myList.sort()
myDict = {'Interconnectivity' : inter,
'PropCover' : prop,
'PatchSize' : patch,
'ShapeIndex': shp,
'Naturalness' : nat,
'EdgeNat' : edge}
myVal = 101 # using 101 as a max + 1 possible value; adjust if needed
myReturn = ''
for k, v in myDict.iteritems():
if v < myVal:
myVal = v
myReturn = k
return myReturn
Note that if you have two matching low values, there's nothing to select one over the other. That would require additional checking based on whatever your criteria is. Since a dictionary is unordered, you can't control it that way.
Here's another way without dictionaries, with an optional clause for ties. You may want different logic in case of ties.
def myFunction2 (inter, prop, patch, shp, nat, edge):
# use tuples to ensure value order
myScoreTuple = (prop, patch, shp, nat, edge)
myTextTuple = ('PropCover',
'PatchSize',
'ShapeIndex',
'Naturalness',
'EdgeNat')
# initialize values
myLowValue = inter
myReturn = 'Interconnectivity'
# now check for any lower value
for i in range(len(myScoreTuple)):
if myScoreTuple[i] < myLowValue:
myLowValue = myScoreTuple[i]
myReturn = myTextTuple[i]
# optional - add multiple text values in case of tie. Remove if unneeded
elif myScoreTuple[i] == myLowValue:
myReturn = ', '.join((myReturn, myTextTuple[i]))
return myReturn