Python script - control flow statements

Hi guys.I'm just beginner of python.
I'm just trying to do some analysis on simple input file.
it has 6 columns and i want to consider k,l and m,n if i and j are +
after that checking which value is greater or lower in k,l and m,n
I have included logic header just to explain what I was trying to do
plz take a look at my python script.Plz Suggest me any ideas

Inputfile:

columns k,l,i,m,n,j
30,50,+,100,200,+
210,250,+,100,200,+
150,180,+,100,200,+
80,150,+,100,200,+
150,250,+,100,200,+
100,200,-,100,200,-
200,100,+,200,100,-
100,250,-,50,60,-

logic:

while i and j columns are +,+

if k<m and l<m (30<100 and 50<100)
print all the columns plus "good"
elif k>n and l>n (210>100 and 250>200)
print all the columns with "good"
elif k>m and l<n
print all... with "bad"
elif k>m and l>n
print all.....with "average"
elif k<m and l<n
print all......with "avergae"

outputfile:

columns k,l,i,m,n,j
30,50,+,100,200,+,good
210,250,+,100,200,+,good
150,180,+,100,200,+,bad
80,150,+,100,200,+,average
150,250,+,100,200,+,averge

Python script_raw

put your Python code in code tags, not quote tags.

for line in open("file"):
    oline=line.strip()
    if j =="+" and i=="+":
        k,l,i,m,n,j=oline.split(",")
        if k<m and  l<m:
            print oline,",good"
        elif .....

if you are a beginner, you should go read the documentation. Read the tutorial and get familiarize with Python. From the way you write the code, i believe you haven't even look at the basics. (there is no need for open and close brackets in Python, except for functions/tuples)

Hey thanx for the suggestion.
The tutorial link is really good.
I'm getting the following error when i tried the following sode
Could you plz tell me why
Am I indented wrongly:confused:

Traceback (most recent call last):
File "filehandler.py", line 11, in <module>
if j=="+" and i=="+":
NameError: name 'j' is not defined
Press any key to continue . . .

d = {}

for line in open ("filename.csv"):
    oline=line.strip()
    if j=="+" and i=="+":
        k,l,i,m,n,j=oline.split(",")
        if k<m and  l<m:
            print oline,",Good"
        elif k>n and l>n:
            print oline,",Good"
        elif k>m and l<n:
            print oline,",IBad"
        elif k<m and l<n:
            print oline,",Avg"
        elif k>m and l>n:
            print oline,",Avg"

else:
    print ' not found'


please look at the error carefully, its says "j" is not defined. that's all there is. very straightforward.

    if j=="+" and i=="+":
        k,l,i,m,n,j=oline.split(",")

the above is the offending error. I leave it to you to try finding it yourself. the split should be done before the checking for j value. simple? pls read the tutorial before posting another query.

Hey Got it!
Thanx alot for not telling and directing in the right way
I got the result
I jumbled the lines...........................

 k,l,i,m,n,j=oline.split(",")
 if j=="+" and i=="+":