On Sun, 24 Jul 2016 04:18 am, gst wrote:
> Heuh case 2 :
>
> "String1" or "String2"
>
> Evaluates to "String1" ?
Correct. What did you expect?
Have you read the Fine Manual?
https://docs.python.org/3/reference/expressions.html#boolean-operations
--
Steven
“Cheer up,” they said, “things
On 2016-07-23 19:18, gst wrote:
Heuh case 2 :
"String1" or "String2"
Evaluates to "String1" ?
Suppose you have:
x or y
If bool(x) returns True, then the result will be x, else the result will
be y.
Example 1:
bool("String1") returns True, therefore the result of:
"String1" or "
Heuh case 2 :
"String1" or "String2"
Evaluates to "String1" ?
--
https://mail.python.org/mailman/listinfo/python-list
I got it! Thank you.
Hope in one day I could help other newbies as you do.
--
https://mail.python.org/mailman/listinfo/python-list
On 2016-07-22 14:59, Zagyen Leo wrote:
yeah, it may be quite simple to you experts, but hard to me.
In one of exercises from the Tutorial it said: "Write a program that asks the user their name, if they enter your name
say "That is a nice name", if they enter "John Cleese" or "Michael Palin", t
:
On Jul 22, 2016 7:46 AM, "Gordon Levi" wrote:
>
> Zagyen Leo wrote:
>
> >yeah, it may be quite simple to you experts, but hard to me.
> >
> >In one of exercises from the Tutorial it said: "Write a program that
asks the user their name, if they enter your name say "That is a nice
name", if they
Zagyen Leo wrote:
>yeah, it may be quite simple to you experts, but hard to me.
>
>In one of exercises from the Tutorial it said: "Write a program that asks the
>user their name, if they enter your name say "That is a nice name", if they
>enter "John Cleese" or "Michael Palin", tell them how yo
On Jul 22, 2016 10:00 AM, "Zagyen Leo" wrote:
>
> yeah, it may be quite simple to you experts, but hard to me.
>
> In one of exercises from the Tutorial it said: "Write a program that asks
the user their name, if they enter your name say "That is a nice name", if
they enter "John Cleese" or "Micha
On Fri, Jul 22, 2016, at 09:59, Zagyen Leo wrote:
> yeah, it may be quite simple to you experts, but hard to me.
>
> In one of exercises from the Tutorial it said: "Write a program that asks
> the user their name, if they enter your name say "That is a nice name",
> if they enter "John Cleese" o