Re: [Tutor] Help with loops

2018-05-01 Thread Isaac Tetteh
Hi Shannon, Yes there is a way. First in my opinion I think queue.json is not really a JSON data structure but just a list of list. If you are able to read it then I that’s great. One way to solve this is doing something like below: queue = [ ["James Bruce", "Bananas"], ["Kathe

Re: [Tutor] Help with loops

2018-04-30 Thread Alan Gauld via Tutor
On 30/04/18 14:35, Shannon Evans via Tutor wrote: > Hi, is there any way that i can add a loop or iteration or something so > that i dont have to write out every person who has fruit. Yes that's what loops are for. You have two options in Python: a 'for' loop or a 'while' loop In your case I sus

Re: [Tutor] Help with loops

2016-01-05 Thread Joel Goldstick
On Tue, Jan 5, 2016 at 12:27 PM, Chelsea G wrote: > I need to create a loop to print out the most common phrases with the > counts 5 or greater and the rest to be bucketed into other category. How do > I write the loop to print out the common phrases that have counts of 5 or > more? This is my co

Re: [Tutor] help with loops

2010-03-25 Thread Walter Prins
So, am I right that for each X value in file 2, you want to look up to see if you can find a corresponding line in file 1 where the value from file 2 falls between the X and Y value from file 1, and if found, then output the original line from file 2 and the 6th column from the found line from file

Re: [Tutor] help with loops

2010-03-25 Thread bob gailer
On 3/25/2010 11:34 AM, kumar s wrote: Dear group: I need some tips/help from experts. I have two files tab-delimted. One file is 4K lines. The other files is 40K lines. I want to search contents of a file to other and print those lines that satisfy. File 1: chr X Y chr1