<p>I have the following problem:</p>

<pre><code>  # line is a line from a file that contains ["baa","beee","0"]
  line = TcsLine.split(",")
  NumPFCs = eval(line[2])
  if NumPFCs==0:
     print line
</code></pre>

<p>I want to print all the lines from the file if the second position of the list has a value == 0.</p>

<p>I print the lines but after that the following happens:
Traceback (most recent call last):</p>

<p>['baaa', 'beee', '0', '\n']</p>

<p><strong><em>BUT after I have the next ERROR</em></strong></p>

<pre><code>ilation.py", line 141, in ?
    getZeroPFcs()
ilation.py", line 110, in getZeroPFcs
    NumPFCs = eval(line[2])
  File "&lt;string&gt;", line 0
</code></pre>

<p>Can you please help me?
thanks</p>

<p>What0s</p>

Your question is kind of hard to read, but using eval there is definitely not a good idea.  Either just do a direct string comparison:
```
```
line=TcsLine.split(",")
if line[2] == "0":
    print line
```
```
or use int
```
```
line=TcsLine.split(",")
if int(line[2]) == 0:
    print line
```
```
Either way, your bad data will fail you.
I'd also recomment reading
PEP 8
.