Re: Just starting to learn Python, and encounter a problem

2016-07-23 Thread Steven D'Aprano
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

Re: Just starting to learn Python, and encounter a problem

2016-07-23 Thread MRAB
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 "

Re: Just starting to learn Python, and encounter a problem

2016-07-23 Thread gst
Heuh case 2 : "String1" or "String2" Evaluates to "String1" ? -- https://mail.python.org/mailman/listinfo/python-list

Re: Just starting to learn Python, and encounter a problem

2016-07-22 Thread Zagyen Leo
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

Re: Just starting to learn Python, and encounter a problem

2016-07-22 Thread MRAB
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

Re: Just starting to learn Python, and encounter a problem

2016-07-22 Thread justin walters
: 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

Re: Just starting to learn Python, and encounter a problem

2016-07-22 Thread Gordon Levi
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

Re: Just starting to learn Python, and encounter a problem

2016-07-22 Thread Bob Gailer
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

Re: Just starting to learn Python, and encounter a problem

2016-07-22 Thread Random832
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