Re: [Tutor] OR operator?

2006-04-06 Thread Alan Gauld
> I'm trying with this operator, could it possible? > > fruit1 = 'apple' > fruit2 = 'orange' > > fruits = fruit1 or fruit2 > > is 'orange' = fruits ? Why not just try it at the python prompt?! And you would find that no, fruits = 'apple' (The order is because fruits is a name which references

Re: [Tutor] OR operator?

2006-04-05 Thread Charles Bartley
> > I'm trying with this operator, could it possible? > > fruit1 = 'apple' > fruit2 = 'orange' > > fruits = fruit1 or fruit2 > > is 'orange' = fruits ? Maybe this: ### fruit1 = 'apple' fruit2 = 'orange' fruits = [fruit1, fruit2] print 'orange' in fruits# prints the boolean result of 'o

[Tutor] OR operator?

2006-04-05 Thread ទិត្យវិរៈ
Hi, I'm trying with this operator, could it possible? fruit1 = 'apple' fruit2 = 'orange' fruits = fruit1 or fruit2 is 'orange' = fruits ? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor