CPLEX not in
Python, and I've never seen CPLEX mention mentioned in this Python
newsgroup. None of which means you won't get an answer here, but I
think a CPLEX specific forum would be a better bet.
Gary Herron
--
https://mail.python.org/mailman/listinfo/python-list
a different location.
my question is what happens to the original string?? Is it still in
memory somewhere, nameless?
Thanks in advance,
Yes, possibly, for a short while it will be nameless in memory
somewhere. If nothing else is pointing to it, it will eventually be
garbage coll
mic%20language%20and%20also%20a%20strongly%20typed%20language
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
tation examples). It's far, FAR,
easier than rolling your message, especially when attachments are needed.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
are important.
Mostly, using "is" is inappropriate and will get you into compassions
that depend on implementation details. For instance don't use "is"
until you understand this:
q:~> python3
Python 3.3.1 (default, Apr 17 2013, 22:32:14)
[GCC 4.7.3] on linux
Type &
On 08/10/2013 03:09 PM, Chris Angelico wrote:
On Sat, Aug 10, 2013 at 10:48 PM, Gary Herron
wrote:
This is an oversimplification, but generally useful for all beginner (and
most advanced) programmers:
Don't use "is" for comparisons. Use "==".
It 20 years of
On 08/10/2013 08:09 PM, Krishnan Shankar wrote:
Thanks Tim,
This takes me to one more question.
'is' operator is used to compare objects and it should not be used to
compare data.
So can it be compared with 'False'.
i.e. Is this code possible
if a is False:
print 'Yes'
if b is False:
On 08/10/2013 06:00 PM, Chris Angelico wrote:
On Sun, Aug 11, 2013 at 1:42 AM, Gary Herron
wrote:
On 08/10/2013 03:09 PM, Chris Angelico wrote:
_notpassed = object()
def frob(appendage, device=_notpassed):
"""Use some appendage to frob some device, or None to frob noth
On 08/10/2013 08:43 PM, Chris Angelico wrote:
On Sun, Aug 11, 2013 at 4:21 AM, Gary Herron
wrote:
On 08/10/2013 06:00 PM, Chris Angelico wrote:
Wrong. If you do equality comparisons, it's entirely possible for
something to be passed in that compares equal to the RHS without
actually bei
and does save a few characters, I think the
original list is clearer to a reader of your program.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
ect, encapsulates some kind of behavior.
However, *hiding* the members of a class is not considered Pythonic.
There is no private/public as in C++, however, there are way to achieve
that effect.
Gary Herron
--
http://mail.python.org/mailman/listinfo/python-list
ing about
the same thing.
My problem is mostly with the basic architecture of the system. I think
I will be able to figure out the code. Also, any comments on the use of
the Django framework for this project.
Thanks in advance
Gary R.
--
http://mail.python.org/mailman/listinfo/python-list
On 08/23/2013 04:38 PM, jeangaw...@gmail.com wrote:
Python allows you set the value of True
True = 1.3
Now this is consistent with the decision to let you set the
value of various builtin names. But why is this case different:
None = 1.3
File "", line 1
SyntaxError: cannot assign to Non
e of the
Django framework for this project.
Hello Gary,
Is your primary goal to write code or is it to have available to you a
document archiving solution?
If the latter, you will probably save time by using an existing system
(e.g., Google Docs).
If the former, I have a few thoughts.
One, you should pr
ther you follow that argument or not, I hope you come to like
Python's indentation eventually. Many (most?) of the rest of here have.
Gary Herron
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
http://mail.python.org/mailman/listinfo/python-list
ng names.
But this has *nothing* at all to do with objects and encapsulation.
Please don't confuse:
the binding of names to objects and
the existence of objects and their encapsulated behavior
They are very different things.
--
Dr. Gary Herron
Department of Computer Science
Dig
figure out how to fix it.
Any help will be sincerely appreciated.
Gary R.
--
http://mail.python.org/mailman/listinfo/python-list
e byte stream, and do
whatever it wants in response.
By calling it a _command_, you seem to expect some particular behavior
out of the receiving process. Please tell us *what* that might be, and
we'll see what we can do to help out.
Gary Herron
--
Dr. Gary Herron
Department of Com
/admin/
Django Version: 1.5.2
Exception Type: ImportError
Exception Value:
cannot import name membership
Exception Location:
/home/gary/ProgramFiles/mysite/mysite/admin.py in
, line 4
On 09/19/2013 11:56 AM, John Gordon wrote:
In Gary Roach
writes:
On 09/19/2013 11:15 AM, John Gordon wrote:
Does /home/gary/ProgramFiles/mysite/mysite/models.py define an object
named 'membership'?
Yes. The following is the top part of the models.py file: q
class
On 09/19/2013 11:15 AM, John Gordon wrote:
In Gary Roach
writes:
Installation of the django admin.py package worked fine. But. when I
tried to add my database to the admin page I get the following error:
ImportError at /admin/
Does /home/gary/ProgramFiles/mysite/mysite/models.py
What were you trying to achieve?
Since you are asking volunteers to help, it would be polite to take the
time to explain things carefully.
Gary Herron
--
https://mail.python.org/mailman/listinfo/python-list
package might offer the remaining functionality easily.
Thanks for any pointers!
jlc
For creating PDFs from Python, consider:
ReportLab: Open Source Python Libraries for PDF creation
at http://www.reportlab.com/software/opensource/
I've used it successfully.
Gary Herron
--
vided. Try again with a full description of what
you want, and we'll try to provide a useful answer.
Gary Herron
--
https://mail.python.org/mailman/listinfo/python-list
ified aesthetically pure, and hence far
superior to any solution more mundane coders might produce.
That was uncalled for. There is already too much Nikos-bashing and
Nikos-basher-bashing (and so on) in this newsgroup without dredging up
even more in this completely unrelated request.
Gary H
t ask the authors of the
application about using the application. Actual Python questions are
welcome here and will probably generate answers.
Gary Herron
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/lis
do not have the apt-get, aptitude tools that Debian
makes available.
My goal is to end up with a clean system ready for re installation of a
development environment.
Any help will be sincerely appreciated.
Gary R.
--
https://mail.python.org/mailman/listinfo/python-list
ndy.
I've got os.path.dirname aliased to dn, so its dn(_code_file()) that I find
myself reaching for fairly often...
Huh? In what kind of a workflow are you running a python file without
knowing *what* file you are runnung?
Or am I just misinterpreting what this code does?
Confused bu
On 10/27/2013 04:38 AM, rusi wrote:
On Sunday, October 27, 2013 6:44:35 AM UTC+5:30, Gary Roach wrote:
Hi
In the process of trying to learn python, django, mysql and
virtualenvwrapper, I have created two projects and a mess. How can I
strip everything from a Debian, Wheezy, linux system. The
, git, python-django file structure
and installation order.
Any help with straightening out my brain in this area will be sincerely
appreciated.
Gary R.
--
https://mail.python.org/mailman/listinfo/python-list
examples please.
Gary Herron
--
https://mail.python.org/mailman/listinfo/python-list
On 11/10/2013 04:48 PM, Kennedy Salvino wrote:
Em domingo, 10 de novembro de 2013 21h34min39s UTC-3, Gary Herron escreveu:
On 11/10/2013 02:56 PM, kennedysalvino...@gmail.com wrote:
I'm trying to make a ranking of 3 numbers and say which the greatest and
consider whether there is
ntax for prints.
Python2: print line # This is a statement
Python3 print(line) # This is a procedure call
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
...but I want numerically 5 hours later, because of
Daylight Savings Time')
main()
Thanks!
The pyzt module (which you've imported) has lots to say about this. Look
at its procedures "localize' and 'normalize' and all the rest of the
pyzt documentation.
--
Dr.
dition:
def cond1(i,j,a,b):
return i+j>4
and do
test1(..., cond1)
and
if condition(i,j,a,b):
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
img = Image.new('1', (1024, 1280), 1)
>>> imagedata = list(img.getdata())
>>> print len(imagedata)
1310720
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
On 04/15/2015 02:51 PM, Chris Withers wrote:
Hi All,
I'm pleased to announce the release of xlwt 1.0.0.
What a curiously incomplete announcement. Could you tell us what xlwt
is? I see no hint here.
Gary Herron
This release contains the following:
- Python 3 support.
- An in
rthy GUI programming libraries, and each of them is cross
platform (as I required to develop on Linux, but deploy occasionally on
Windows).
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
On 04/26/2015 11:07 AM, Cecil Westerhof wrote:
Op Sunday 26 Apr 2015 19:12 CEST schreef Gary Herron:
On 04/26/2015 09:32 AM, Cecil Westerhof wrote:
Op Sunday 26 Apr 2015 17:09 CEST schreef Steven D'Aprano:
On Sun, 26 Apr 2015 11:02 pm, Cecil Westerhof wrote:
I want to use a GUI for P
9))
>>> l
range(0, 100000)
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
text = webpage.read().decode("utf8")
except URLError as err:
print("URLError: " + str(err))
How do I wrap urllib.request with try/except?
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
t's still available as __builtins__.int (unless you've also
overridden that).
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
ing to define a concept called "keywords", I don't
think you should allow them to be shadowed by a class definition.
Mark
Huh? Python has plenty of keywords, and indeed, none of them can be
redefined or shadowed.But you would gain nothing (and lose a bit or
dynamic-language
quot;
argument should drive *all* decisions is foolish. And disingenuous.
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
ith your workaround, since the assignment to stdout is
preserved when done outside the function.
I hope that helps.
Gary Herron
if opath is None:
for line in stdout.splitlines():
yield line.strip()
else:
with open(opath) as f:
for line in f:
m the dot operators from left to right or according
to a rule of order (i.e., multiplication/division before add/subtract)?
Yes, that's correct.
Gary Herron
Thank you,
Chris Reimer
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
re likely that that file is correct, and you are
somehow misinterpreting its contents, but we can't even begin to guess
until you show us its current content.
Gary
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
on?
This is a statement about floating point numeric calculations on a
computer,. As such, it does apply to Python which uses the underlying
hardware for floating point calculations.
Validity is another matter. Where did you find the quote?
Gary Herron
Any other thoughts? :D
My imagini
ll, but gives an exact
zero instead.
0.0
The squaring of the two values in x*x+y*y just makes the addition even
more error prone since the squares make large values even larger and
small values even smaller.
Gary Herron.
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Tec
On 05/26/2015 05:43 PM, richard_riehle wrote:
I realized that I mentioned earlier that I found a solution to my original
question, but that I never posted an example of the solution. So, here is a
simplified example for anyone who is interested.
def fArray(fselect, fparm = 1):
def A
gt;>> __builtins__.open = "whatever"
>>>
Python3:
>>> import builtins
>>> builtins.open = "whatever"
>>>
Of course doing so is like shooting yourself in the foot: Any
subsequent pain is your own fault and probably well deserved.
G
o line you have above). Then it will be defined, and calling
parlindrome('...')
will produce a result rather than an error.
Gary Herron
a
'1234_'
parlindrome(a)
Traceback (most recent call last):
File "", line 1, in
parlindrome(a)
NameError: nam
>>> sorted(d.values())
[123, 456]
or the key/value tuples (called items)
>>> sorted(d.items())
[('a', 123), ('b', 456)]
but each of those attempts to sort could fail on a general dictionary if
the individual keys or values are not sortable.
Ther
se (Tkinter and the curses module) are distributed with
Python, so you should already have them installed.
Gary Herron
Other suggestions seemed to be overkill and confused me to due to my
beginner level knowledge and the fact these suggestions have other, more
complicated elements to them.
se (Tkinter and the curses module) are distributed with
Python, so you should already have them installed.
Gary Herron
Other suggestions seemed to be overkill and confused me to due to my
beginner level knowledge and the fact these suggestions have other, more
complicated elements to them.
-
Traceback (most recent call last):
File "./readfile1.py", line 19, in
t=thread.start_new_thread(proc(f),())
TypeError: first arg must be callable
You should probably also consider using the higher-level threading
module rather than the lower level thread module.
(Also consider us
I have no idea
what "inverse" has to do with anything), but I won't waste my time doing
so. If you take the time to carefully explain what you want, then I'm
sure you will find plenty of people here who will take the time to
answer you.
Gary Herron
--
https://mail.python.org/mailman/listinfo/python-list
ort numpy
>>> a = numpy.array([1,2,3])
>>> id(a[1])
28392768
>>> id(a[1])
28409872
This produces two different view of the same underlying object.
Gary Herron
--
https://mail.python.org/mailman/listinfo/python-list
On 06/05/2015 06:39 AM, Todd wrote:
On Fri, Jun 5, 2015 at 3:23 PM, Gary Herron
<mailto:gary.her...@islandtraining.com>> wrote:
On 06/05/2015 06:11 AM, Paul Appleby wrote:
On Fri, 05 Jun 2015 14:55:11 +0200, Todd wrote:
Numpy arrays are not lists, they
person['name'] = 'jose'
person['age'] = 12
people.append(person)
Here's where you need to create the second one.
person['name'] = 'kacey'
person['age'] = 18
people.append(person)
for person in people:
print( person[
t same name:
>>> _ = 123
>>> print(_)
123
>>>
Gary Herron
--
https://mail.python.org/mailman/listinfo/python-list
a postgres account in postgres
or is Django supposed to do this with the migrate command. I feel like
I am at a critical point where I can really screw things up and need
some expert advise. This is my first time working with python / Django
and am really shaky. I do have another learning project (rango) using
SQLite that works fine.
Gary R
--
https://mail.python.org/mailman/listinfo/python-list
On 07/15/2015 11:25 AM, Chris Angelico wrote:
On Thu, Jul 16, 2015 at 3:13 AM, Gary Roach wrote:
Every time I try to do a python manage.py migrate I get:
django.db.utils.OperationalError: FATAL: password
authentication failed for user "postgres"
FATAL: password authentication faile
On 07/18/2015 04:36 PM, Terry Reedy wrote:
I would like more viewpoints from 2.7 users.
I read that (incorrectly of course) and just had to ask:
How do you intend to extract a viewpoint from that last 7/10 of a user?
With apologies,
Gary Herron
--
Dr. Gary Herron
Department of
On 07/16/2015 04:53 PM, Chris Angelico wrote:
On Fri, Jul 17, 2015 at 9:34 AM, Gary Roach wrote:
On 07/15/2015 11:25 AM, Chris Angelico wrote:
You should then be able to create a regular user, and grant
appropriate permissions:
postgres=# create user archives password
'traded-
On 07/16/2015 04:53 PM, Chris Angelico wrote:
On Fri, Jul 17, 2015 at 9:34 AM, Gary Roach wrote:
On 07/15/2015 11:25 AM, Chris Angelico wrote:
You should then be able to create a regular user, and grant
appropriate permissions:
postgres=# create user archives password
'traded-
On 07/22/2015 04:44 PM, Chris Angelico wrote:
On Thu, Jul 23, 2015 at 9:35 AM, Gary Roach wrote:
At this point, I'm confused about a few things. Does the postgresql server
and my archivedb reside globally or are they inside my archivedb virtual
environment. I think globally.
Your vi
ex.html (Django
1.7) and home.html (Django 1.8) is the name changes.
I have inserted print statements in the url tree to try debugging this
but all the path information returned seems reasonable.
Is this a bug in Ninja-IDE, Django 1.8 or is it something else.
If you need more information, pl
On 07/30/2015 11:15 PM, dieter wrote:
Gary Roach writes:
Being new to Django and Python, I have two projects setup side by
side, each in it's own virtualenv wrapper.
The twr_project is running Django 1.7, python 2.7 and is set up to
duplicate the 'Tango With Rango' tutorial
On 07/30/2015 11:15 PM, dieter wrote:
Gary Roach writes:
Being new to Django and Python, I have two projects setup side by
side, each in it's own virtualenv wrapper.
The twr_project is running Django 1.7, python 2.7 and is set up to
duplicate the 'Tango With Rango' tutorial
use to be a whiz at
fortran, C and Xbase but haven't done anything since I retired.
Good luck
Gary R
--
https://mail.python.org/mailman/listinfo/python-list
):
"""Deletes the given key from the Map."""
bucket = get_bucket(aMap, key)
for i in xrange(len(bucket)):
k, v = bucket[i]
if key == k:
del bucket[i]
break
def list(aMap):
"""Prints out what's in the Map."""
for bucket in aMap:
if bucket:
for k, v in bucket:
print k, v
Very frustrating and probably a stupid error. Any help will be sincerely
appreciated.
Gary R.
--
https://mail.python.org/mailman/listinfo/python-list
On 09/09/2015 01:45 PM, John Gordon wrote:
In Gary Roach
writes:
Traceback (most recent call last):
File "/root/mystuff/mystuff/ex39_test.py", line 6, in
hashmap.set(states, 'Oregon', 'OR')
File "/root/mystuff/mystuff/hashmap.py", line
On 09/09/2015 01:45 PM, John Gordon wrote:
In Gary Roach
writes:
Traceback (most recent call last):
File "/root/mystuff/mystuff/ex39_test.py", line 6, in
hashmap.set(states, 'Oregon', 'OR')
File "/root/mystuff/mystuff/hashmap.py", line
On 09/09/2015 01:45 PM, John Gordon wrote:
In Gary Roach
writes:
Traceback (most recent call last):
File "/root/mystuff/mystuff/ex39_test.py", line 6, in
hashmap.set(states, 'Oregon', 'OR')
File "/root/mystuff/mystuff/hashmap.py", line
s the trick? if not any pointers on what I can do to get it to go. Are
there any other xmi parsers or tools?
Thanks
Gary
Error output below --
>python setup.py install
running install
running bdist_egg
running egg_info
writing entry points to xmiparser.egg-info\entry_points.txt
Laura,
Thanks for the pointer to PyXB, I think this will work for my purposes and it
appears to be Python 3.4 / Windows compatible.
Thank you to all who helped.
On Friday, October 9, 2015 at 1:14:32 PM UTC-5, Laura Creighton wrote:
> In a message of Fri, 09 Oct 2015 10:24:34 -0700, G
n.py loads the bin, include and lib directories into the
project instead of the normal django setup.
django 1.8
Debian 8 (jessie) OS
python 3.4
Any help will be sincerely appreciated.
Gary R.
--
https://mail.python.org/mailman/listinfo/python-list
) lines to print(...) (without the colon) and
try again. If there is further trouble, ask another question, but
please cut and paste the actual and *exact* results into the email.
Gary Herron
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
han a Python question. (Or rather a
question about some Python/Cplex interface.) Do you have access to any
kind of a CPLEX forum or a Cplex-via-Python forum? I think that's much
more likely to get you an answer.
Luck,
Gary Herron
--
https://mail.python.org/mailman/listinfo/python-list
string ...
Gary Herron
--
https://mail.python.org/mailman/listinfo/python-list
lways been there.
See https://docs.python.org/2/tutorial/floatingpoint.html for more details.
Gary Herron
fresh install of
https://www.python.org/ftp/python/3.4.1/python-3.4.1.amd64.msi
and a fresh install of
https://www.python.org/ftp/python/2.7.7/python-2.7.7.amd64.msi
to compare it to.
On 06/20/2014 06:11 PM, FraserL wrote:
Ok I've seen https://docs.python.org/2/tutorial/floatingpoint.html now
thanks to Yhg1s on #python
I bet you get this kind of thing a lot, sorry :-/
Yes, often, but it's not a problem. :-)
FraserL wrote in
news:XnsA35313E634BA0fraserlonggmailcom34@21
.
So you have to ask yourself: What do you gain from using Python if you
eliminate all the tools Python provides?
Gary Herron
-
Paul S. LaFollette, Jr
CIS Department
Temple University
+1 215 204 6822
paul.lafolle...@temple.edu <mailto:paul.lafolle...@tem
583 module.
Do you know how to contact the developers of the ISO8583 package?
Gary Herron
If I send it incorrect parameter, the server will reply but if I send it
correctly, the server didn't response.
The original client is in java using ISOMUX, I have been trying to use the
pyMux
n!!!
It's not quite self-contained, as you still need to have Python
installed, but otherwise it's a good way to distribute a Python
application as a single file that users can just copy and run.
Really! 20 years of Pythoning, and I'd never seen this! When was this
introduced?
ou are just learning Python, you should probably use the
*newer* formatting operations. See
https://docs.python.org/3.3/library/string.html#formatspec for details
of that.
Gary Herron
--
https://mail.python.org/mailman/listinfo/python-list
for line in lines:
line = re.sub("#.*", "", line)
line = line.strip()
The *strip* method on strings removes all whitespace from both ends.
There goes your indentation.
policy_lines.append(line)
print line
Cheers
Example:
>&g
I need to be able to access Oracle from both Windows and *nix, however, it
seems kind of tortuous getting everything working each time on each server.
With Java I can just drop (usually the same) JDBC library files in a location
and everything works. I'm sure there's some easier way of doing thi
e. Please cut and paste.
Second, saying it doesn't work us useless. Please tell us what the code
is supposed to do, and what it actually does, what you expected... If
there is output, cut and paste it. If there is an error traceback, cut
and paste it.
While you are at it, tell u
1440)
>>> a.shape = (480,1440)
>>> a.shape
(480, 1440)
Gary Herron
--
https://mail.python.org/mailman/listinfo/python-list
programming language).
I'm not sure where you would find information about face detection, but
I'm sure you could find a better forum with a little searching.
Gary Herron
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.
ed:
x**2 ? or perhaps x^2 ? or something else like some Unicode
characters or HTML to get a small superscript 2 above an x.
Once you give an example of what your input looks like, we can start
hashing out how to read it.
Gary Herron
--
Dr. Gary Herron
Department of Computer Science
DigiP
you know how to test for evenness? (Use count%2 will be zero
for even count values.)
* Do you know how to write lines to an output file?
Gary Herron
--
https://mail.python.org/mailman/listinfo/python-list
unter, '\r', # The ending comma means do NOT output the usual \n
Python3:
print(counter, end='\r')
Gary Herron
--
https://mail.python.org/mailman/listinfo/python-list
On 09/12/2011 12:49 AM, Alec Taylor wrote:
Good evening,
I have converted ODT to HTML using LibreOffice Writer, because I want
to convert from HTML to Creole using python-creole. Unfortunately I
get this error: "File "Convert to Creole.py", line 17
SyntaxError: Non-ASCII character '\xe2' in file
st an internal loop for filling an array) is probably
more efficient, certainly less code, and arguably more Pythonic.
A = [ [None,None] for i in range(1000) ]
Gary Herron
--
Gary Herron, PhD.
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
http://mail.python.org/mailman/listinfo/python-list
t; a[3:6]
array([3, 4, 5])
If you mean something else, please be more specific, and we'll try again.
Gary Herron
--
Gary Herron, PhD.
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
http://mail.python.org/mailman/listinfo/python-list
On 09/15/2011 11:55 AM, neeru K wrote:
Dear Gary,
thank you for the reply.
I will be more specific and take the same example that you have given
and tell you what is my problem -
array([0.0, 1.3, 2.45, 3.87, 4.54, 5.11, 6.90, 7.78, 8.23, 9.01])
from this array I want to a sub-list with lower
:
sum(map(int,str(2**1000)))
1366
Here's another one-liner using a generator instead of map:
sum(int(c) for c in str(2**1000))
Gary Herron
--
Gary Herron, PhD.
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
http://mail.python.org/mailman/listinfo/python-list
201 - 300 of 1014 matches
Mail list logo