Re: [Tutor] which of these is more efficient?

2019-08-19 Thread nathan tech
Hello everyone, thank you so much for your responses. When I said efficient, I meant in terms of storage, both in a file for saving maps if the user chooses to save, and in the computers memory. Low memory programs=happy users. sometimes. These responses have been really helpful, and I did

Re: [Tutor] which of these is more efficient?

2019-08-19 Thread Mark Lawrence
On 19/08/2019 00:55, nathan tech wrote: Hi there, So I am running over some coding ideas in my head for creating a map for a game. This map would expand based on how far the user explores. I figure there are two ways to do this: 1: the list method: map=[] for x in range(3):  temp=[]  

[Tutor] which of these is more efficient?

2019-08-19 Thread nathan tech
Hi there, So I am running over some coding ideas in my head for creating a map for a game. This map would expand based on how far the user explores. I figure there are two ways to do this: 1: the list method: map=[] for x in range(3):  temp=[]  for y in range(3):  

Re: [Tutor] which of these is more efficient?

2019-08-19 Thread Peter Otten
nathan tech wrote: > Hi there, > > So I am running over some coding ideas in my head for creating a map for > a game. > > This map would expand based on how far the user explores. > > I figure there are two ways to do this: > > 1: the list method: > > map=[] > > for x in range(3): > >

Re: [Tutor] which of these is more efficient?

2019-08-19 Thread Alan Gauld via Tutor
On 19/08/2019 00:55, nathan tech wrote: > Is this an efficient method compared to 1? Efficient in what sense? The amount of code to write? The amount of computing resources used? The speed - and does that matter in an interactive game like this? -- Alan G Author of the Learn to Program web

Re: [Tutor] which of these is more efficient?

2019-08-19 Thread Mats Wichmann
On 8/18/19 5:55 PM, nathan tech wrote: > Hi there, > > So I am running over some coding ideas in my head for creating a map for > a game. > > This map would expand based on how far the user explores. > > I figure there are two ways to do this: > > 1: the list method: > > map=[] > for x in