In <121be20a-c02a-4b0e-a86f-7c69597b9...@googlegroups.com>
=?ISO-8859-1?Q?Ana_Dion=EDsio?= writes:
> t= [3,5,6,7,10,14,17,21]
> Basically I want to print Test 1 when i is equal to an element of the
> list "t" and print Test 2 when i is not equal:
> while i<=25:
> if i==t[]:
>pri
On Wed, 20 Mar 2013 11:15:27 -0700, Ana Dionísio wrote:
> t= [3,5,6,7,10,14,17,21]
>
> Basically I want to print Test 1 when i is equal to an element of the
> list "t" and print Test 2 when i is not equal:
Wouldn't it make more sense to print "Equal" and "Not equal"?
If all you want to do is ch
On 2013-03-20 11:15, Ana Dionísio wrote:
> t= [3,5,6,7,10,14,17,21]
>
> Basically I want to print Test 1 when i is equal to an element of
> the list "t" and print Test 2 when i is not equal:
>
> while i<=25:
> if i==t[]:
>print "Test1"
> else:
>print "Test2"
>
> What is m
On Wed, Mar 20, 2013 at 2:15 PM, Ana Dionísio wrote:
>
> t= [3,5,6,7,10,14,17,21]
>
> Basically I want to print Test 1 when i is equal to an element of the list
> "t" and print Test 2 when i is not equal:
>
>
> while i<=25:
>
You test i, but you don't set i to anything, or change it in your loop
Hi Ana,
if I understand your question correctly, all you have to do to test this is to
write:
if i in t:
print "Test1"
else:
print "Test2"
On Wednesday, March 20, 2013 2:15:27 PM UTC-4, Ana Dionísio wrote:
> t= [3,5,6,7,10,14,17,21]
>
>
>
> Basically I want to print Test 1 when i is e
t= [3,5,6,7,10,14,17,21]
Basically I want to print Test 1 when i is equal to an element of the list "t"
and print Test 2 when i is not equal:
while i<=25:
if i==t[]:
print "Test1"
else:
print "Test2"
What is missing here for this script work?
Thank you all
--
http: