Re: arrays in python

2009-09-23 Thread Simon Forman
On Wed, Sep 23, 2009 at 10:03 PM, AggieDan04 wrote: > On Sep 23, 3:02 pm, Simon Forman wrote: >> On Wed, Sep 23, 2009 at 1:14 PM, Rudolf wrote: >> > Can someone tell me how to allocate single and multidimensional arrays >> > in python. I looked online and it says to do the following x = >> > ['1

Re: arrays in python

2009-09-23 Thread AggieDan04
On Sep 23, 3:02 pm, Simon Forman wrote: > On Wed, Sep 23, 2009 at 1:14 PM, Rudolf wrote: > > Can someone tell me how to allocate single and multidimensional arrays > > in python. I looked online and it says to do the following x = > > ['1','2','3','4'] > > > However, I want a much larger array li

Re: arrays in python

2009-09-23 Thread Donn
On Wednesday 23 September 2009 22:12:24 Ethan Furman wrote: > Works great if you want 4,999,999 elements. ;-) Omit the '1' if you > want all five million. Yes. Fenceposts always get me :) And I was just reminded that one can: l=range(500) \d -- home: http://otherwise.relics.co.za/ 2D vector

Re: arrays in python

2009-09-23 Thread Ethan Furman
Donn wrote: On Wednesday 23 September 2009 19:14:20 Rudolf wrote: I want to allocate an array and then populate it using a for loop. You don't need to allocate anything, just use the list or dictionary types. l=[] #empty list for x in range(1,500): l.append(x) \d Works great if you

Re: arrays in python

2009-09-23 Thread Simon Forman
On Wed, Sep 23, 2009 at 1:22 PM, Donn wrote: > On Wednesday 23 September 2009 19:14:20 Rudolf wrote: >> I want to allocate an array and then populate it >> using a for loop. > You don't need to allocate anything, just use the list or dictionary types. > > l=[] #empty list > for x in range(1,50

Re: arrays in python

2009-09-23 Thread Simon Forman
On Wed, Sep 23, 2009 at 1:14 PM, Rudolf wrote: > Can someone tell me how to allocate single and multidimensional arrays > in python. I looked online and it says to do the following x = > ['1','2','3','4'] > > However, I want a much larger array like a 100 elements, so I cant > possibly do that. I

Re: arrays in python

2009-09-23 Thread Michel Claveau - MVP
Hi! See: http://docs.python.org/tutorial (section 5) @+ -- MCI -- http://mail.python.org/mailman/listinfo/python-list

Re: arrays in python

2009-09-23 Thread Benjamin Kaplan
On Sep 23, 2009, at 1:16 PM, Rudolf wrote: > Can someone tell me how to allocate single and multidimensional arrays > in python. I looked online and it says to do the following x = > ['1','2','3','4'] > > However, I want a much larger array like a 100 elements, so I cant > possibly do that. I wan

Re: arrays in python

2009-09-23 Thread Donn
On Wednesday 23 September 2009 19:14:20 Rudolf wrote: > I want to allocate an array and then populate it > using a for loop. You don't need to allocate anything, just use the list or dictionary types. l=[] #empty list for x in range(1,500): l.append(x) \d -- http://mail.python.org/mailman/

Re: arrays in python

2006-02-10 Thread plahey
> Oh, don't tell me, I love playing guessing games! Don't you mean "No no... don't tell me. I'm keen to guess." Sorry, I couldn't resist... :-) (for those who just went huh?, see http://www.aldo.com/sgt/CheeseShoppeSkit.htm) -- http://mail.python.org/mailman/listinfo/python-list

Re: arrays in python

2006-02-10 Thread Steven D'Aprano
On Fri, 10 Feb 2006 17:50:21 -0500, Kermit Rose wrote: > I want to write a program in python using integer arrays. > > I wish to calculate formulas using 200 digit integers. Must the integers have exactly 200 digits? If you multiply one of these 200-digit integers by ten, should it silently ove

Re: arrays in python

2006-02-10 Thread Schüle Daniel
> I want to write a program in python using integer arrays. you can :) > I wish to calculate formulas using 200 digit integers. no problem > I could not find any documentation in python manual about declaring arrays. > > I searched the internet read here http://diveintopython.org/native_dat

Re: arrays in python

2006-02-10 Thread Steve Holden
Kermit Rose wrote: > From: Kermit Rose > Date: 02/10/06 17:36:34 > To: [EMAIL PROTECTED] > Subject: Arrays > > > Hello. > > I want to write a program in python using integer arrays. > > I wish to calculate formulas using 200 digit integers. > > I could not find any documentation in pytho