for line in sys.stdin.readlines(): fields = line.split("\t") for field in fields[:250]: file1.write(field + '\t') file1.write('\n') It's just taking the first 250 elements of a list and writing them ...
Need to code a Javascript function on a page. I have a comma separated list, e.g. (1,2,5,6,8) that identifies the ID of a form element. Is there an easy way to loop over this list directly (as you can ...