Python - Scan for string

Hi
i have a variable 'reform' and store the lines like

reform= {
record
string(8) ID;
string(4) PRD;
date("YYMMDD", split = "800101") DateofManufact;
string(4) PRDC_MODULE_NUM;
string(1) END_OF_RECORD = "\n";
}

I need to search for the character "\n"in the above variable 'reform'.
if "\n" is available then i need to return boolean
i.e

return not "\n" in fields

I tried like below

fields = $reform_out2.field_names()
return not "newline" in fields

It is not working, can any one throw some light into it.

Regards
Dhana

Could you clarify it a bit? You're using curly braces, which indicate a dictionary, but you're not entering dictionary values. The code you provide doesn't execute in Python.

If you provide some working code that's giving bad results I'll try to help you fix it, but I can't do much with what you provided.

Thanks,
Shawn