Re: appending a line to a list based off of a string found in a previous list

2015-12-12 Thread Pedro Vincenty
On Saturday, December 12, 2015 at 4:48:46 PM UTC-5, Pedro Vincenty wrote: > Hello, I'm wondering how to append a line from a file onto a list(easy part) > provided that the line contains strings specific to a previous list I've > already made(hard part). I have this right now, > for line in sat

Re: appending a line to a list based off of a string found in a previous list

2015-12-12 Thread Erik
Hi Pedro, It would be _really useful_ if you included code that could be pasted into an interpreter or file directly to show your problem. You are referencing several data sources ("satellite_dataread" and "list2") that we can only guess at. On 12/12/15 21:48, Pedro Vincenty wrote: Hello, I'm w

Re: appending a line to a list based off of a string found in a previous list

2015-12-12 Thread Terry Reedy
On 12/12/2015 4:48 PM, Pedro Vincenty wrote: Hello, I'm wondering how to append a line from a file onto a list(easy part) provided that the line contains strings specific to a previous list I've already made(hard part). I have this right now, for line in satellite_dataread: if any(i i

appending a line to a list based off of a string found in a previous list

2015-12-12 Thread Pedro Vincenty
Hello, I'm wondering how to append a line from a file onto a list(easy part) provided that the line contains strings specific to a previous list I've already made(hard part). I have this right now, for line in satellite_dataread: if any(i in line for i in list2): line= line.