peter would not the more correct way to do this be short circuit evaluation. somthing along lines of
if (len(item) > 0) and (item[0] == '-'): pass seems to be the more correct approach. rather than relying on slicing to return an empty string. For instance suppose you wanted to test to see if than spot contained an empty string. If you used the slice meathod you would be in a pickle. However in this particular case it seems to be clear that the use of .startswith() is the single best approach. -- http://mail.python.org/mailman/listinfo/python-list