On Sunday, 2 September 2012 23:40:32 UTC+5:30, Terry Reedy wrote:
> On 9/2/2012 7:17 AM, Mark Lawrence wrote:
>
> > On 02/09/2012 12:05, Rishabh Dixit wrote:
>
> >> Hi,
>
> >>
>
> >> I got it :). We should create a new list every time before
0, 0], [0, 0, 0, 0, 0], [0, 0,
0, 0, 0]]
This worked for me!! Thanx :)
On Sun, Sep 2, 2012 at 4:30 PM, Rishabh Dixit wrote:
> Hi Chris,
>
> Thanks for your reply. I tried this -
>
> >>> ls=[0 for i in range(5)]
> >>> mat=[ls for i in range(5)]
> >>&
ere as ls refers to one list that is
being repeated through mat and change in one causes change in others also.
Is there any solution to change all elements independently.
On Sun, Sep 2, 2012 at 3:14 PM, Rishabh Dixit wrote:
>
> Hi all,
>
> I have a doubt regarding how the list work in
it is
increasing 1 value in all the lists of ls. Why??
--
Regards,
Rishabh Dixit
MSc.(Tech) Information Systems,
BITS Pilani
--
http://mail.python.org/mailman/listinfo/python-list