"sith ." <[EMAIL PROTECTED]> wrote: > How can I determine if the elements in a are larger or smaller than > the elements in b. > .. > like 2 columns in excel, the third column would be > a new list of boolean values. Can someone help please? Thank you.
Hi, in that case, you need to create the third column (list). Instead of values, iterate over indices and use those to fetch the values, ie: c = [] for i in range(min(len(a), len(b))): c.append(a[i] > b[i]) or using list comprehension: c = [a[i] > b[i] for i in range(min(len(a), len(b)))] tezlo _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor