>>temp_values1 =
>> (x.pop(9))+(x.pop(8))+(x.pop(7))+(x.pop(6))+(x.pop(5))+(x.pop(4))+(x.pop(3))+(x.pop(2))+(x.pop(1))+(x.pop(0))
>> temp_values2 =
>> (x.pop(19))+(x.pop(18))+(x.pop(17))+(x.pop(16))+(x.pop(15))+(x.pop(14))+(x.pop(13))+(x.pop(12))+(x.pop(11))+(x.pop(10))
When you pop a valu
If you are interested in a symbolic solution or numerical solution without
missing any of the possible roots (real or imaginary) you could check out
sympy, a CAS that offers a quartic solution. It uses appropriate
simplifications besides a general solution to the quartic. The code for this is
i
>> 1. Re: List comprehension question (Richard D. Moores)
>>> ?: def proper_divisors_sum(n):
>>> A few questions--noting, of course, that I'm not reading this with
>>> an eye toward performance, which it seems you are, but these occur
>>> to me:
Tim Peters had a beautiful little version of divi
C or L Smith wrote:
> Am I misunderstanding a tokenize parse rule or is this an error:
>
> ###
> def tok(s):
> import tokenize
> from StringIO import StringIO
> t = StringIO(s).readline
> for ti in tokenize.generate_tokens(t):
>
Am I misunderstanding a tokenize parse rule or is this an error:
###
def tok(s):
import tokenize
from StringIO import StringIO
t = StringIO(s).readline
for ti in tokenize.generate_tokens(t):
print ti
tok("'''quote: \")
###
produces
(3, "'''quote: '''", (1, 0), (1, 13)
>> Hello. I am Roman. I bought this book call Python Programming for
>> the Absolute Beginner which I am and after I downloaded Python 2.3.5
>> from their CD, I opened IDLE, typed "Game Over" and nothing
>> happened. What do I do? Please, help. I don't understand any of the
>> programming jargon. P
>> Serdar wrote:
...
>> So again, is there a way to place a time limit on the execution of a
>> function, after which you can break out of it and then retry it or
>> move along with the rest of your program?
At http://tinyurl.com/rbre9n you can find a recipe that tells you how to
decorate a funct
What about range(0, -n, -1) ?
>>> That would need to have a starting value of -1 and an end value of
>>> -(len(phrase)+1). Of else you can start at length - 1, end at zero
>>> and a step value of -1.
>>
>> Another option, using "normal" range values but negative indexing is
>>
>> for
Here is something from my toolbox of routines that might be useful for the
number ranges:
>>> indices('-5--2')
[-5, -4, -3, -2]
>>> indices('3-4')
[3, 4]
>>> indices('3-4,10')
[3, 4, 10]
/chris
def indices(s,n=None): #("1-3,7")->1,2,3,7;i("1,-3--1")->1,-3,-2,-1; or
(slc,n=None)->slc.start,stop
>> From: Alex Feddor
>>
>> I am looking for method enables advanced text string search. Method
>> string.find() or re module seems no supporting what I am looking
>> for. The idea is as follows:
>>
>> Text ="FDA meeting was successful. New drug is approved for whole
>> sale distribution!"
>>
>
Unum is a module that allows one to handle units with numbers, e.g. 3*M -> 3
[m], a measurement of 3 meters.
I have a module that I wrote some time ago that handles uncertainties with
numbers as they are involved with calculations. Let's call it the pnum module
(for physical numbers) e.g. pnum(
Danny Yoo wrote:
| On Mon, 30 Oct 2006, C or L Smith wrote:
|
|| Can anyone help me figure out how to actually get logged in so I can
|| file the report?
|
| Do you happen to have cookies disabled? You might need to enable
| them, since that's what SF will use to track your login status.
I know this is off topic, but can anyone give me a hand? I have a sourceforge
account. I want to make a correction to the python documentation. I click on
the appropriate link at the bottom of the documentation page and then the bug
tracker link on the page that I am sent to which takes me to
13 matches
Mail list logo