Hi, On Sun, Jan 13, 2019 at 8:34 AM <mhysnm1...@gmail.com> wrote:
> description.sort() > TypeError: unorderable types: float() < str() So, fairly obviously, we can't test whether a float is less than a string. Any more than we can tell if a grapefruit is faster than a cheetah. So there must be items in description that are strings and floats. With 2000 lines, you're going to struggle to eyeball this, so try something like this: In [69]: irrational_numbers = [3.14159265, 1.606695, "pi", "Pythagoras Constant"] In [70]: from collections import Counter In [71]: dict(Counter([type(e) for e in irrational_numbers])) Out[71]: {float: 2, str: 2} If with your data, this shows only strings, I'll eat my hat. S. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor