Adam Jensen wrote:
Side note: if one were to only import specific functions from a module,
would the load time and memory consumption be smaller? Example, is:
from random import randint, seed
smaller and faster than:
import random
Basically
from random import randint, seed
is
On Fri, 19 Dec 2014 10:32:15 +0100
Peter Otten __pete...@web.de wrote:
Basically
from random import randint, seed
is equivalent to
import random
randint = random.randint
seed = random.seed
del random
From that you can deduce that the whole random module is loaded into memory
in
On 18/12/14 21:10, Abdullahi Farah Mohamud wrote:
hello i need help with a program and i dont understand what is wrong
Please always add a meaningful subject line.
when the computers asks the user if he would like to go again
and the user says yes, it asks for the number of lines
and then
On Fri, 19 Dec 2014 00:55:49 +
Alan Gauld alan.ga...@btinternet.com wrote:
You could have used a list instead of all the
individual variables
line[0] = ...
line[1] = ...
But then you could get clever and use a loop:
while lines != 0:
start = 1
period = 7
for lineNum
On Thu, 18 Dec 2014 20:27:03 -0500
Adam Jensen han...@riseup.net wrote:
And to build the 'lines' list (although, this is getting rather ugly):
lines = [[random.randint(x,x+6) for x in range(1,50,7)] for i in range(7)]
Oops, in the context of the original program this might make more sense