See
http://docs.python.org/py3k/library/stdtypes.html#boolean-operations-and-or-not.
I am quite familiar with the meaning of x and y in Python, and how
it is evaluated -- first x, and only if x is False, then evaluate y.
But I just can't read if x is false, then x, else y that way. In
fact, I
On 05-Jul-10 00:27, Richard D. Moores wrote:
Seehttp://docs.python.org/py3k/library/stdtypes.html#boolean-operations-and-or-not.
I am quite familiar with the meaning of x and y in Python, and how
it is evaluated -- first x, and only if x is False, then evaluate y.
But I just can't read if x is
On Mon, Jul 5, 2010 at 00:55, Steve Willoughby st...@alchemy.com wrote:
On 05-Jul-10 00:27, Richard D. Moores wrote:
Seehttp://docs.python.org/py3k/library/stdtypes.html#boolean-operations-and-or-not.
I am quite familiar with the meaning of x and y in Python, and how
it is evaluated -- first
Richard D. Moores, 05.07.2010 11:37:
I keep getting hung up over the meaning of the return
value of an expression. I am of course familiar with values returned
by a function, but don't quite grasp what the return value of, say,
the y of x and y might mean.
Think of a different expression, like
On Mon, Jul 5, 2010 at 04:09, Stefan Behnel stefan...@behnel.de wrote:
Richard D. Moores, 05.07.2010 11:37:
I keep getting hung up over the meaning of the return
value of an expression. I am of course familiar with values returned
by a function, but don't quite grasp what the return value of,
On 5 July 2010 08:27, Richard D. Moores rdmoo...@gmail.com wrote:
See
http://docs.python.org/py3k/library/stdtypes.html#boolean-operations-and-or-not
.
I am quite familiar with the meaning of x and y in Python, and how
it is evaluated -- first x, and only if x is False, then evaluate y.
On Mon, Jul 5, 2010 at 04:54, Walter Prins wpr...@gmail.com wrote:
On 5 July 2010 08:27, Richard D. Moores rdmoo...@gmail.com wrote:
See
http://docs.python.org/py3k/library/stdtypes.html#boolean-operations-and-or-not.
I am quite familiar with the meaning of x and y in Python, and how
it is
On 5 July 2010 12:53, Richard D. Moores rdmoo...@gmail.com wrote:
On Mon, Jul 5, 2010 at 04:09, Stefan Behnel stefan...@behnel.de wrote:
Richard D. Moores, 05.07.2010 11:37:
I keep getting hung up over the meaning of the return
value of an expression. I am of course familiar with values
On 5 July 2010 13:21, Adam Bark adam.jt...@gmail.com wrote:
On 5 July 2010 12:53, Richard D. Moores rdmoo...@gmail.com wrote:
On Mon, Jul 5, 2010 at 04:09, Stefan Behnel stefan...@behnel.de wrote:
Richard D. Moores, 05.07.2010 11:37:
I keep getting hung up over the meaning of the return
On Mon, 5 Jul 2010 07:37:12 pm Richard D. Moores wrote:
On Mon, Jul 5, 2010 at 00:55, Steve Willoughby st...@alchemy.com
wrote:
[...]
Steve,
Your answer seems very well-formulated. However, I've read it over
and over, but I keep getting hung up over the meaning of the return
value of an
Hello,
I seem to be having problems with raw_input.
i wrote something like:
raw_input('Press Enter')
it comes back to tell me raw_input is not defined, a NameError!
Is it that something about it has changed in python 3.1 or I have been
writing the wrong thing.
Please enlighten me.
regards.
hi
I am trying problem 6 in projecteuler.org.
What is the smallest positive number that is evenly divisible by all
of the numbers from 1 to 20?
def rr(z,m=1):
q=lambda n:m%n==0
s=lambda False : 0
a=filter(s,map(q,range(1,z)))
if not a:
m+=1
use input() instead of raw_input() in Python3.x
On Mon, Jul 5, 2010 at 8:50 PM, Dipo Elegbede delegb...@dudupay.com wrote:
Hello,
I seem to be having problems with raw_input.
i wrote something like:
raw_input('Press Enter')
it comes back to tell me raw_input is not defined, a NameError!
Tried it out and it worked.
Thanks.
Regards,
On 7/5/10, Shashwat Anand anand.shash...@gmail.com wrote:
use input() instead of raw_input() in Python3.x
On Mon, Jul 5, 2010 at 8:50 PM, Dipo Elegbede delegb...@dudupay.com wrote:
Hello,
I seem to be having problems with raw_input.
i wrote
On 7/5/2010 8:31 AM prasad rao said...
hi
I am trying problem 6 in projecteuler.org.
What is the smallest positive number that is evenly divisible by all
of the numbers from 1 to 20?
def rr(z,m=1):
q=lambda n:m%n==0
s=lambda False : 0
On 5 July 2010 17:40, Shashwat Anand anand.shash...@gmail.com wrote:
use input() instead of raw_input() in Python3.x
To add to this, in Python 2 we had input() [1] (unsafe for most uses)
and raw_input() [2] (safe). Python 3 removed the old input() and
renamed raw_input() to input() [3,4].
Hello Srihari!
On Sunday July 4 2010 20:17:12 Srihari k wrote:
I did #chmod +s settime.py so that SUID bit be set and all users can
execute the script and set the system time.
now the permissions of file are:
-rwsr-xr-x 1 root root 165 2010-07-04 23:16 settime.py
The script still works
prasad rao prasadarao...@gmail.com wrote
def rr(z,m=1):
q=lambda n:m%n==0
s=lambda False : 0
This is always false???
a=filter(s,map(q,range(1,z)))
So this is always empty?
if not a:
So this is always true
m+=1
rr(z,m)
Hello all,
Can some one help me to return a special pattern from a list.
say list =
[something1.mp3,something2.mp3,something4.pdf,something5.odt]
now say I just need to return the files with .mp3 extension. How to go about
doing this?
Thanks
Vin
___
On 5 July 2010 19:54, Vineeth Rakesh vineethrak...@gmail.com wrote:
Can some one help me to return a special pattern from a list.
say list =
[something1.mp3,something2.mp3,something4.pdf,something5.odt]
now say I just need to return the files with .mp3 extension. How to go about
doing this?
On Mon, Jul 5, 2010 at 11:24 PM, Vineeth Rakesh vineethrak...@gmail.comwrote:
Hello all,
Can some one help me to return a special pattern from a list.
say list =
[something1.mp3,something2.mp3,something4.pdf,something5.odt]
One suggestion. Don't name a list as list. Use l or List or any
On Mon, Jul 5, 2010 at 11:58 PM, Shashwat Anand anand.shash...@gmail.comwrote:
On Mon, Jul 5, 2010 at 11:24 PM, Vineeth Rakesh
vineethrak...@gmail.comwrote:
Hello all,
Can some one help me to return a special pattern from a list.
say list =
Hi,
I'm doing the exercises here: chapter 8
http://www.openbookproject.net/thinkCSpy/ch08.html
Now I have added another paddle to the pong game. So far so good, but the
ball isn't moving anymore and I am not able to fix it...
Any comments, tips, feedback?
Thanks in advance,
Shashwat Anand anand.shash...@gmail.com wrote
list =
[something1.mp3,something2.mp3,something4.pdf,something5.odt]
[i for i in list if i[-4:] == '.mp3']
['something1.mp3', 'something2.mp3']
Or even easier:
[s for s in list if s.endswith('.mp3')]
But for the specific case of file
On Mon, 05 Jul 2010 20:29:02 +0200
tutor-requ...@python.org wrote:
Date: Mon, 5 Jul 2010 13:54:55 -0400
From: Vineeth Rakesh vineethrak...@gmail.com
To: tutor@python.org
Subject: [Tutor] Help return a pattern from list
Message-ID:
On 7/5/2010 4:19 PM Alan Gauld said...
But for the specific case of file extensions the os.path.splitext() is
a better solution.
If, as the names suggest, the source is the file system, then I'd reach
for glob.
Emile
___
Tutor maillist -
26 matches
Mail list logo