Re: Error in or

2015-06-12 Thread Marko Rauhamaa
Steven D'Aprano : > This is better written as: > > if any(substr in inp1 for substr in >['AND', 'OR', 'NOT', '>', '&', 'MAYBE', '(', '*', ' " ']): > print 'FINE' Or, equivalently: for substr in ['AND', 'OR', 'NOT', '>', '&', 'MAYBE', '(', '*', ' " ']: if substr

Re: Error in or

2015-06-12 Thread Steven D'Aprano
On Thu, 11 Jun 2015 08:40:50 -0700, subhabrata.banerji wrote: > if ("AND" in inp1) or ("OR" in inp1) or ("NOT" in inp1) or (">" in > inp1) or ("&" in inp1) or ("MAYBE" in inp1) or ("(" in inp1) or ("*" > in inp1) or (''' " ''' in inp1): This is better written as: if any(substr in inp

Re: Error in or

2015-06-11 Thread Mark Lawrence
On 11/06/2015 17:39, subhabrata.bane...@gmail.com wrote: On Thursday, June 11, 2015 at 9:20:59 PM UTC+5:30, Ian wrote: On Thu, Jun 11, 2015 at 9:40 AM, if write this it is working fine, but if I write if ("AND" in inp1) or ("OR" in inp1) or ("NOT" in inp1) or (">" in inp1) or ("&" in inp

Re: Error in or

2015-06-11 Thread subhabrata . banerji
On Thursday, June 11, 2015 at 10:18:33 PM UTC+5:30, Ian wrote: > On Thu, Jun 11, 2015 at 10:39 AM, wrote: > > On Thursday, June 11, 2015 at 9:20:59 PM UTC+5:30, Ian wrote: > >> On Thu, Jun 11, 2015 at 9:40 AM, > >> > if write this it is working fine, but if I write > >> > > >> > if ("AND" in

Re: Error in or

2015-06-11 Thread Ian Kelly
On Thu, Jun 11, 2015 at 10:39 AM, wrote: > On Thursday, June 11, 2015 at 9:20:59 PM UTC+5:30, Ian wrote: >> On Thu, Jun 11, 2015 at 9:40 AM, >> > if write this it is working fine, but if I write >> > >> > if ("AND" in inp1) or ("OR" in inp1) or ("NOT" in inp1) or (">" in inp1) >> > or ("&" i

Re: Error in or

2015-06-11 Thread subhabrata . banerji
On Thursday, June 11, 2015 at 9:20:59 PM UTC+5:30, Ian wrote: > On Thu, Jun 11, 2015 at 9:40 AM, > > if write this it is working fine, but if I write > > > > if ("AND" in inp1) or ("OR" in inp1) or ("NOT" in inp1) or (">" in inp1) > > or ("&" in inp1) or ("MAYBE" in inp1) or ("(" in inp1) or

Re: Error in or

2015-06-11 Thread Ian Kelly
On Thu, Jun 11, 2015 at 9:40 AM, wrote: > if write this it is working fine, but if I write > > if ("AND" in inp1) or ("OR" in inp1) or ("NOT" in inp1) or (">" in inp1) or > ("&" in inp1) or ("MAYBE" in inp1) or ("(" in inp1) or ("*" in inp1) or (''' > " ''' in inp1): > > the portion of (

Error in or

2015-06-11 Thread subhabrata . banerji
Dear Group, In the following script, inp1=raw_input("PRINT YOUR INPUT:") if ("AND" in inp1) or ("OR" in inp1) or ("NOT" in inp1) or (">" in inp1) or ("&" in inp1) or ("MAYBE" in inp1) or ("(" in inp1) or ("*" in inp1): if write this it is working fine, but if I write if ("AND" in