Steven D'Aprano wrote:
> On Wed, 28 Dec 2005 15:07:52 +0100, Christoph Zwerschke wrote:
>>Chris is probably working on Windows where it is handy to enter paths as
>>raw strings because of the backslashes. Unusual however, and problematic
>>if you want to use the program on other platforms, is ope
On Wed, 28 Dec 2005 15:07:52 +0100, Christoph Zwerschke wrote:
> Steven D'Aprano wrote:
>> On Wed, 28 Dec 2005 07:29:41 +, Chris Smith wrote:
> >>
>>>def createGrid():
>>>f = open(r"...sudoku.txt", "rb") ## see attached for the file.
>>
>> Why do you need a raw string? It isn't wrong to
Steven D'Aprano wrote:
> On Wed, 28 Dec 2005 07:29:41 +, Chris Smith wrote:
>>
>>def createGrid():
>>f = open(r"...sudoku.txt", "rb") ## see attached for the file.
>
> Why do you need a raw string? It isn't wrong to do one, but it is rather
> unusual and unnecessary.
Chris is probably wo
On Wed, 28 Dec 2005 07:29:41 +, Chris Smith wrote:
> Hi,
>
> I've been working on some multi-dimensional lists and I've encountered some
> very strange behaviour in what appears to be simple code, I'm using python
> 2.4.2 and IDLE. If anyone can tell me why it's behaving so strange please
> l
Chris Smith wrote:
> I've been working on some multi-dimensional lists and I've encountered some
> very strange behaviour in what appears to be simple code, I'm using python
> 2.4.2 and IDLE. If anyone can tell me why it's behaving so strange please
> let me know, any improvements to my general co
Hi,
I've been working on some multi-dimensional lists and I've encountered some
very strange behaviour in what appears to be simple code, I'm using python
2.4.2 and IDLE. If anyone can tell me why it's behaving so strange please
let me know, any improvements to my general coding style are also
ap
> > [sj]
> >> Thus, random access is an O(1) operation while insertion/deletion is an
> >> O(n) operation.
[Raymond Hettinger]
> > Yes.
[Heikki Orsila aka host.invalid]
> Unfortunately no. Check Terry Reeds answer. Random access is O(1),
> insertion/deletion to front is O(n), and i/d to back is O
Raymond Hettinger <[EMAIL PROTECTED]> wrote:
> [sj]
>> Thus, random access is an O(1) operation while insertion/deletion is an
>> O(n) operation.
> Yes.
Unfortunately no. Check Terry Reeds answer. Random access is O(1),
insertion/deletion to front is O(n), and i/d to back is O(1). The back
i/d op
[sj]
> I believe the type "list" is implemented as an array of pointers.
Yes.
> Thus, random access is an O(1) operation while insertion/deletion is an
> O(n) operation.
Yes.
> 2. Implementing list as an array is part of language specification or
> implementation-dependent?
Implementation de
"sj" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I believe the type "list" is implemented as an array of pointers.
A Python list is sematically/behaviorally defined as a mutable extensible
sequence of references to Python objects. For the CPython reference
implementation, the
I believe the type "list" is implemented as an array of pointers.
Thus, random access is an O(1) operation while insertion/deletion is an
O(n) operation. That said, I have the following questions:
1. Am I correct in saying the above?
2. Implementing list as an array is part of language specifica
I believe the type "list" is implemented as an array of pointers.
Thus, random access is an O(1) operation while insertion/deletion is an
O(n) operation. That said, I have the following questions:
1. Am I correct in saying the above?
2. Implementing list as an array is part of language specifica
12 matches
Mail list logo