In article <553a5ded$0$12978$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
>On Sat, 25 Apr 2015 12:50 am, subhabrata.bane...@gmail.com wrote:
>
>> Dear Group,
>>
>> I am trying to understand the use of Boolean operator in Python. I am
>> trying to write small piece of script, as fol
On Saturday, April 25, 2015 at 6:52:53 AM UTC+5:30, Mark Lawrence wrote:
> On 25/04/2015 01:51, Terry Reedy wrote:
> >
> > Based on my experience reading newbie posts on python list and
> > Stackoverflow, learning to write real functions, without input and
> > print, and repeatable tests, is the mo
On 25/04/2015 01:51, Terry Reedy wrote:
Based on my experience reading newbie posts on python list and
Stackoverflow, learning to write real functions, without input and
print, and repeatable tests, is the most important thing many people are
not learning from programming books and classes.
G
On Saturday, April 25, 2015 at 6:21:56 AM UTC+5:30, Terry Reedy wrote:
> Functions that do real calculation should be written as functions that
> take an input object (or objects) and produce an output object.
> Based on my experience reading newbie posts on python list and
> Stackoverflow, l
On 4/24/2015 10:50 AM, subhabrata.bane...@gmail.com wrote:
Dear Group,
I am trying to understand the use of Boolean operator in Python. I am trying to
write small piece of script, as follows,
def input_test():
str1=raw_input("PRINT QUERY:")
if "AND" or "OR" or "NOT" in str1:
On 2015-04-24 09:00, Ian Kelly wrote:
> It is not equivalent to:
>
> if ("AND" in str1) or ("OR" in str1) or ("NOT" in str1):
Which python allows you to write nicely as
if any(term in str1 for term in ["AND", "OR", "NOT"]):
The use of any()/all() has certainly improved the readability of
On Friday, April 24, 2015 at 8:45:04 PM UTC+5:30, Steven D'Aprano wrote:
> On Sat, 25 Apr 2015 12:50 am,wrote:
>
> > Dear Group,
> >
> > I am trying to understand the use of Boolean operator in Python. I am
> > trying to write small piece of script, as follows,
> >
> > def input_test():
> >
On Sat, 25 Apr 2015 12:50 am, subhabrata.bane...@gmail.com wrote:
> Dear Group,
>
> I am trying to understand the use of Boolean operator in Python. I am
> trying to write small piece of script, as follows,
>
> def input_test():
> str1=raw_input("PRINT QUERY:")
> if "AND" or "OR" or "NOT
On Fri, Apr 24, 2015 at 8:50 AM, wrote:
> Dear Group,
>
> I am trying to understand the use of Boolean operator in Python. I am trying
> to
> write small piece of script, as follows,
>
> def input_test():
> str1=raw_input("PRINT QUERY:")
> if "AND" or "OR" or "NOT" in str1:
This
Dear Group,
I am trying to understand the use of Boolean operator in Python. I am trying to
write small piece of script, as follows,
def input_test():
str1=raw_input("PRINT QUERY:")
if "AND" or "OR" or "NOT" in str1:
print "It is a Boolean Query"
elif "AND
10 matches
Mail list logo