python function returns no value
When I define a function, it returns no value. However, I've verified the
code of the function alone in IDLE,and it works. Where is the problem? The
file truly contains the value I want to get. My code:
import re,csv F=open('file.csv') ...... def prog_rownum(Ref,s): P=[]
reader=csv.reader(s) for row in reader: m=re.match(Ref,','.join(row)) if
m: P.append(reader.line_num) return P ...... P1=prog_rownum('U16',F)
......
No comments:
Post a Comment