Dag schrieb:
> I have a problem which is probaly very simple to solve, but I can't
> find a nice solution.
> I have the following code
>
> class Test:
> def __init__(self):
> self.a=[1,2,3,4]
> self.b=self.a
> def swap(self):
> self.a[0],self.a[3]=self.a[3],self.a[
On Mar 29, 8:43 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> In <[EMAIL PROTECTED]>, Dag wrote:
> > I have a problem which is probaly very simple to solve, but I can't
> > find a nice solution.
> > I have the following code
>
> > class Test:
> > def __init__(self):
> > self
In <[EMAIL PROTECTED]>, Dag wrote:
> I have a problem which is probaly very simple to solve, but I can't
> find a nice solution.
> I have the following code
>
> class Test:
> def __init__(self):
> self.a=[1,2,3,4]
> self.b=self.a
self.b = list(self.a)
BTW this is a
I have a problem which is probaly very simple to solve, but I can't
find a nice solution.
I have the following code
class Test:
def __init__(self):
self.a=[1,2,3,4]
self.b=self.a
def swap(self):
self.a[0],self.a[3]=self.a[3],self.a[0]
def prnt(self):
pr