Just an example among many :)

On Mar 30, 2017 6:07 PM, "Kyle Lahnakoski" <klahnako...@mozilla.com> wrote:

>
>
> On 2017-03-30 05:18, Markus Meskanen wrote:
> > Hi Pythonistas,
> >
> > yet again today I ended up writing:
> >
> > d = [[0] * 5 for _ in range(10)]
> >
> >
> > Thoughts?
>
> It looks like you are initializing matrices.  Can you make a helper
> function?
>
> d = matrix(shape=(5, 10), default=0)
>
> or maybe use NumPy?
> _______________________________________________
> Python-ideas mailing list
> Python-ideas@python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to