Hi,
I am using ipython console on one of servers and it's great. Because of that
I've tried to install it on my laptop, but unfortunately I am getting this
error:
Traceback (most recent call last):
> File "/usr/bin/ipython", line 26, in
> import IPython.Shell
> File "/usr/lib/python2.7/d
Greg Christian wrote:
Is there a way to write an if statement that will pick up duplicates (two ‘1’s):
L = ['1', '4', '1']
if (L[0]) != (L[1]) != (L[2]):
print "THEY ARE NOT EQUAL"
else:
print "THEY ARE EQUAL"
When I run this code, it prints “THEY ARE NOT EQUAL” when it should print the
On Sun, May 1, 2011 at 2:28 PM, Greg Christian wrote:
> Is there a way to write an if statement that will pick up duplicates
> (two ‘1’s):
>
> L = ['1', '4', '1']
> if (L[0]) != (L[1]) != (L[2]):
> print "THEY ARE NOT EQUAL"
> else:
> print "THEY ARE EQUAL"
>
> When I run this code, it p
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 05/01/2011 02:28 PM, Greg Christian wrote:
> Is there a way to write an if statement that will pick up duplicates (two
> ‘1’s):
>
> L = ['1', '4', '1']
> if (L[0]) != (L[1]) != (L[2]):
> print "THEY ARE NOT EQUAL"
> else:
> print "THEY ARE
Is there a way to write an if statement that will pick up duplicates (two ‘1’s):
L = ['1', '4', '1']
if (L[0]) != (L[1]) != (L[2]):
print "THEY ARE NOT EQUAL"
else:
print "THEY ARE EQUAL"
When I run this code, it prints “THEY ARE NOT EQUAL” when it should print the
else “THEY ARE EQUAL”.
Andre Engels wrote:
To answer your question, we have to look at Python's data model, which
differs from that in other languages.
Strictly speaking, that is true: Python's data model is different from
that of (say) C, or Pascal, or Forth. But it's also the same as that in
other languages, lik
ya.you'r right. left it accidentally.thanks.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Knacktus wrote:
When I initialize the class which holds these dictionaries, though, I
need
to make sure that all the keys contained in d2 match the keys of d1.
Thus I
tried:
d1 = {'a': 0, 'b': 0, 'c': 0}
Now d1 holds the address of a dict in memory. [...]
Let me guess... did you learn C b
naheed arafat wrote:
> someone please tell me why i'm getting this output?
> specially the 'e3%' ! ! !
import re
re.findall('([\w]+.)','abdd.e3\45 dret.8dj st.jk')
> ['abdd.', 'e3%', 'dret.', '8dj ', 'st.', 'jk']
>
> I am getting the same output for the following too..
re.findall(r