Re: [Tutor] how to compare elements of 2 lists

2007-12-25 Thread tezlo
at 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

Re: [Tutor] python CLI parser

2007-12-21 Thread tezlo
An empty string is returned when EOF is encountered immediately. but you strip() the command (in two places) and lose the chance of checking for that very case. Hope this helps. tezlo ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor