Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #98843

What function is 'u0, j = random(), 0'?

Newsgroups comp.lang.python
Date 2015-11-14 18:23 -0800
Message-ID <f2965552-575a-44fc-9c34-dbc4792d4208@googlegroups.com> (permalink)
Subject What function is 'u0, j = random(), 0'?
From fl <rxjwg98@gmail.com>

Show all headers | View raw


Hi,

When I read the below code, I cannot make the last line (with ######) out.



def res(weights):
  n = len(weights)
  indices = []
  C = [0.] + [sum(weights[:i+1]) for i in range(n)]
  u0, j = random(), 0  ######


If I run below code on console, it will say an error.

uu, 0.1, 0


What difference is between these two example lines?

Thanks,

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

What function is 'u0, j = random(), 0'? fl <rxjwg98@gmail.com> - 2015-11-14 18:23 -0800
  Re: What function is 'u0, j = random(), 0'? Zachary Ware <zachary.ware+pylist@gmail.com> - 2015-11-14 20:47 -0600
  Learning Python from the tutorial (was: What function is 'u0, j = random(), 0'?) Ben Finney <ben+python@benfinney.id.au> - 2015-11-15 14:03 +1100

csiph-web