On 26/02/15 11:06, Timo wrote:
If you need to use it as a list you need to explicitly
convert it using list():
unvisited_caves = range(0,20)
I think you missed your own solution here, Alan. You probably meant:
unvisited_caves = list(range(0, 20))
Oops! Thanks for picking that up.
--
Alan G
On Thu, Feb 26, 2015 at 08:55:55AM +, Alan Gauld wrote:
> However remove() may not do what you think. It removes the
> value zero from your list not the first element. I this case they are
> the same but in other cases they might not be. You may want to use del()
> instead
>
> del(unvisited
Op 26-02-15 om 09:55 schreef Alan Gauld:
On 26/02/15 04:30, kcberry wrote:
So I am new to this, and I have a book call /Hello Python by Anthony
Briggs/.
It is a good book but it is using Python 2 I think and I can't get my
code
to work. I get an "AttributeError: 'range' object has no attribute
On 26/02/15 04:30, kcberry wrote:
So I am new to this, and I have a book call /Hello Python by Anthony Briggs/.
It is a good book but it is using Python 2 I think and I can't get my code
to work. I get an "AttributeError: 'range' object has no attribute
'remove'". I have tried to look it up on th
So I am new to this, and I have a book call /Hello Python by Anthony Briggs/.
It is a good book but it is using Python 2 I think and I can't get my code
to work. I get an "AttributeError: 'range' object has no attribute
'remove'". I have tried to look it up on the web with no luck. Can someone
help