Python 3.8.6 | packaged by conda-forge | (default, Oct 7 2020, 19:08:05)

Type "copyright", "credits" or "license" for more information.


IPython 7.19.0 -- An enhanced Interactive Python.


In [1]: runfile('/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py', wdir='/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20')

True


In [2]: runfile('/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py', wdir='/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20')

False


In [3]: runfile('/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py', wdir='/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20')

------------------- Starting recursion -------------------

entering palindromaP('ottantadue',)

exiting palindromaP('ottantadue',) returns False

-------------------- Ending recursion --------------------

Num calls: 1


In [4]: runfile('/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py', wdir='/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20')

Reloaded modules: rtrace

------------------- Starting recursion -------------------

entering palindromaP('otto',)

|-- entering palindromaP('tt',)

|--|-- entering palindromaP('',)

|--|-- exiting palindromaP('',) returns True

|-- exiting palindromaP('tt',) returns True

exiting palindromaP('otto',) returns True

-------------------- Ending recursion --------------------

Num calls: 3


In [5]: runfile('/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py', wdir='/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20')

Reloaded modules: rtrace

------------------- Starting recursion -------------------

entering palindromaP('otto',)

|-- entering palindromaP('tt',)

|--|-- entering palindromaP('',)

|--|-- exiting palindromaP('',) returns True

|-- exiting palindromaP('tt',) returns True

exiting palindromaP('otto',) returns True

-------------------- Ending recursion --------------------

Num calls: 3

Traceback (most recent call last):


File "/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py", line 40, in <module>

palindroma_appoggio.trace([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1])


AttributeError: 'function' object has no attribute 'trace'



In [6]: runfile('/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py', wdir='/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20')

Reloaded modules: rtrace

------------------- Starting recursion -------------------

entering palindromaP('otto',)

|-- entering palindromaP('tt',)

|--|-- entering palindromaP('',)

|--|-- exiting palindromaP('',) returns True

|-- exiting palindromaP('tt',) returns True

exiting palindromaP('otto',) returns True

-------------------- Ending recursion --------------------

Num calls: 3

------------------- Starting recursion -------------------

entering palindroma_appoggio([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1],)

exiting palindroma_appoggio([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1],) returns True

-------------------- Ending recursion --------------------

Num calls: 1


In [7]: runfile('/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py', wdir='/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20')

Reloaded modules: rtrace

------------------- Starting recursion -------------------

entering palindromaP('otto',)

|-- entering palindromaP('tt',)

|--|-- entering palindromaP('',)

|--|-- exiting palindromaP('',) returns True

|-- exiting palindromaP('tt',) returns True

exiting palindromaP('otto',) returns True

-------------------- Ending recursion --------------------

Num calls: 3

------------------- Starting recursion -------------------

entering palindroma_appoggio([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1],)

------------------- Starting recursion -------------------

entering palindroma_index_P([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1], 0, 10)

|-- entering palindroma_index_P([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1], 1, 9)

|--|-- entering palindroma_index_P([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1], 2, 8)

|--|--|-- entering palindroma_index_P([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1], 3, 7)

|--|--|--|-- entering palindroma_index_P([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1], 4, 6)

|--|--|--|--|-- entering palindroma_index_P([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1], 5, 5)

|--|--|--|--|-- exiting palindroma_index_P([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1], 5, 5) returns True

|--|--|--|-- exiting palindroma_index_P([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1], 4, 6) returns True

|--|--|-- exiting palindroma_index_P([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1], 3, 7) returns True

|--|-- exiting palindroma_index_P([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1], 2, 8) returns True

|-- exiting palindroma_index_P([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1], 1, 9) returns True

exiting palindroma_index_P([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1], 0, 10) returns True

-------------------- Ending recursion --------------------

Num calls: 6

exiting palindroma_appoggio([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1],) returns True

-------------------- Ending recursion --------------------

Num calls: 1


In [8]: runfile('/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py', wdir='/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20')

Reloaded modules: rtrace

------------------- Starting recursion -------------------

entering palindroma_appoggio([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1],)

------------------- Starting recursion -------------------

entering palindroma_index_P([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1], 0, 10)

|-- entering palindroma_index_P([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1], 1, 9)

|--|-- entering palindroma_index_P([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1], 2, 8)

|--|--|-- entering palindroma_index_P([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1], 3, 7)

|--|--|--|-- entering palindroma_index_P([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1], 4, 6)

|--|--|--|--|-- entering palindroma_index_P([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1], 5, 5)

|--|--|--|--|-- exiting palindroma_index_P([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1], 5, 5) returns True

|--|--|--|-- exiting palindroma_index_P([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1], 4, 6) returns True

|--|--|-- exiting palindroma_index_P([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1], 3, 7) returns True

|--|-- exiting palindroma_index_P([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1], 2, 8) returns True

|-- exiting palindroma_index_P([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1], 1, 9) returns True

exiting palindroma_index_P([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1], 0, 10) returns True

-------------------- Ending recursion --------------------

Num calls: 6

exiting palindroma_appoggio([1, 3, 5, 6, 3, 2, 3, 6, 5, 3, 1],) returns True

-------------------- Ending recursion --------------------

Num calls: 1


In [9]: runfile('/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py', wdir='/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20')

Reloaded modules: rtrace

------------------- Starting recursion -------------------

entering palindroma_appoggio_2('Amo Roma!',)

------------------- Starting recursion -------------------

entering palindroma_index_2_P('Amo Roma!', 0, 8)

|-- entering palindroma_index_2_P('Amo Roma!', 0, 7)

|--|-- entering palindroma_index_2_P('Amo Roma!', 0, 6)

|--|--|-- entering palindroma_index_2_P('Amo Roma!', 0, 5)

|--|--|--|-- entering palindroma_index_2_P('Amo Roma!', 0, 4)

|--|--|--|--|-- entering palindroma_index_2_P('Amo Roma!', 0, 3)

|--|--|--|--|--|-- entering palindroma_index_2_P('Amo Roma!', 0, 2)

|--|--|--|--|--|--|-- entering palindroma_index_2_P('Amo Roma!', 0, 1)

|--|--|--|--|--|--|--|-- entering palindroma_index_2_P('Amo Roma!', 0, 0)

|--|--|--|--|--|--|--|-- exiting palindroma_index_2_P('Amo Roma!', 0, 0) returns True

|--|--|--|--|--|--|-- exiting palindroma_index_2_P('Amo Roma!', 0, 1) returns True

|--|--|--|--|--|-- exiting palindroma_index_2_P('Amo Roma!', 0, 2) returns True

|--|--|--|--|-- exiting palindroma_index_2_P('Amo Roma!', 0, 3) returns True

|--|--|--|-- exiting palindroma_index_2_P('Amo Roma!', 0, 4) returns True

|--|--|-- exiting palindroma_index_2_P('Amo Roma!', 0, 5) returns True

|--|-- exiting palindroma_index_2_P('Amo Roma!', 0, 6) returns True

|-- exiting palindroma_index_2_P('Amo Roma!', 0, 7) returns True

exiting palindroma_index_2_P('Amo Roma!', 0, 8) returns True

-------------------- Ending recursion --------------------

Num calls: 9

exiting palindroma_appoggio_2('Amo Roma!',) returns True

-------------------- Ending recursion --------------------

Num calls: 1


In [10]: runfile('/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py', wdir='/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20')

Reloaded modules: rtrace

------------------- Starting recursion -------------------

entering palindroma_appoggio_2('Amo Roma!',)

------------------- Starting recursion -------------------

entering palindroma_index_2_P('Amo Roma!', 0, 8)

|-- entering palindroma_index_2_P('Amo Roma!', 0, 7)

|--|-- entering palindroma_index_2_P('Amo Roma!', 0, 6)

|--|--|-- entering palindroma_index_2_P('Amo Roma!', 0, 5)

|--|--|--|-- entering palindroma_index_2_P('Amo Roma!', 0, 4)

|--|--|--|--|-- entering palindroma_index_2_P('Amo Roma!', 0, 3)

|--|--|--|--|--|-- entering palindroma_index_2_P('Amo Roma!', 0, 2)

|--|--|--|--|--|--|-- entering palindroma_index_2_P('Amo Roma!', 0, 1)

|--|--|--|--|--|--|--|-- entering palindroma_index_2_P('Amo Roma!', 0, 0)

|--|--|--|--|--|--|--|-- exiting palindroma_index_2_P('Amo Roma!', 0, 0) returns True

|--|--|--|--|--|--|-- exiting palindroma_index_2_P('Amo Roma!', 0, 1) returns True

|--|--|--|--|--|-- exiting palindroma_index_2_P('Amo Roma!', 0, 2) returns True

|--|--|--|--|-- exiting palindroma_index_2_P('Amo Roma!', 0, 3) returns True

|--|--|--|-- exiting palindroma_index_2_P('Amo Roma!', 0, 4) returns True

|--|--|-- exiting palindroma_index_2_P('Amo Roma!', 0, 5) returns True

|--|-- exiting palindroma_index_2_P('Amo Roma!', 0, 6) returns True

|-- exiting palindroma_index_2_P('Amo Roma!', 0, 7) returns True

exiting palindroma_index_2_P('Amo Roma!', 0, 8) returns True

-------------------- Ending recursion --------------------

Num calls: 9

exiting palindroma_appoggio_2('Amo Roma!',) returns True

-------------------- Ending recursion --------------------

Num calls: 1


In [11]: runfile('/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py', wdir='/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20')

Reloaded modules: rtrace

------------------- Starting recursion -------------------

entering palindroma_appoggio_2('Amo Roma!',)

------------------- Starting recursion -------------------

entering palindroma_index_2_P('Amo Roma!', 0, 8)

|-- entering palindroma_index_2_P('Amo Roma!', 0, 7)

ho controllato A a

|--|-- entering palindroma_index_2_P('Amo Roma!', 1, 6)

ho controllato m m

|--|--|-- entering palindroma_index_2_P('Amo Roma!', 2, 5)

ho controllato o o

|--|--|--|-- entering palindroma_index_2_P('Amo Roma!', 3, 4)

|--|--|--|--|-- entering palindroma_index_2_P('Amo Roma!', 4, 4)

|--|--|--|--|-- exiting palindroma_index_2_P('Amo Roma!', 4, 4) returns True

|--|--|--|-- exiting palindroma_index_2_P('Amo Roma!', 3, 4) returns True

|--|--|-- exiting palindroma_index_2_P('Amo Roma!', 2, 5) returns True

|--|-- exiting palindroma_index_2_P('Amo Roma!', 1, 6) returns True

|-- exiting palindroma_index_2_P('Amo Roma!', 0, 7) returns True

exiting palindroma_index_2_P('Amo Roma!', 0, 8) returns True

-------------------- Ending recursion --------------------

Num calls: 6

exiting palindroma_appoggio_2('Amo Roma!',) returns True

-------------------- Ending recursion --------------------

Num calls: 1


In [12]: runfile('/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py', wdir='/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20')

Reloaded modules: rtrace

[1, 2, 3, 4]

[1, 2, 4, 3]

[1, 3, 2, 4]

[1, 3, 4, 2]

[1, 4, 2, 3]

[1, 4, 3, 2]

[2, 1, 3, 4]

[2, 1, 4, 3]

[2, 3, 1, 4]

[2, 3, 4, 1]

[2, 4, 1, 3]

[2, 4, 3, 1]

[3, 1, 2, 4]

[3, 1, 4, 2]

[3, 2, 1, 4]

[3, 2, 4, 1]

[3, 4, 1, 2]

[3, 4, 2, 1]

[4, 1, 2, 3]

[4, 1, 3, 2]

[4, 2, 1, 3]

[4, 2, 3, 1]

[4, 3, 1, 2]

[4, 3, 2, 1]


In [13]: runfile('/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py', wdir='/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20')

Reloaded modules: rtrace

[1, 2, 3, 2]

[1, 2, 2, 3]

[1, 3, 2, 2]

[1, 3, 2, 2]

[1, 2, 3, 2]

[1, 2, 2, 3]

[2, 1, 3, 2]

[2, 1, 2, 3]

[2, 3, 1, 2]

[2, 3, 2, 1]

[2, 2, 1, 3]

[2, 2, 3, 1]

[3, 1, 2, 2]

[3, 1, 2, 2]

[3, 2, 1, 2]

[3, 2, 2, 1]

[3, 2, 1, 2]

[3, 2, 2, 1]

[2, 1, 3, 2]

[2, 1, 2, 3]

[2, 3, 1, 2]

[2, 3, 2, 1]

[2, 2, 1, 3]

[2, 2, 3, 1]


In [14]: runfile('/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py', wdir='/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20')

Reloaded modules: rtrace

Traceback (most recent call last):


File "/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py", line 80, in <module>

print(*permutazioni([1, 2, 3, 2]), sep='\n')


File "/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/rtrace.py", line 44, in __call__

answer = self.f(*args,**kargs)


File "/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py", line 76, in permutazioni

for P in permutazioni(copia):


File "/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/rtrace.py", line 44, in __call__

answer = self.f(*args,**kargs)


File "/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py", line 76, in permutazioni

for P in permutazioni(copia):


File "/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/rtrace.py", line 44, in __call__

answer = self.f(*args,**kargs)


File "/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py", line 77, in permutazioni

risultato.add(tuple([elemento] + P))


TypeError: can only concatenate list (not "tuple") to list



In [15]: runfile('/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py', wdir='/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20')

Reloaded modules: rtrace

(1, 3, 2, 2)

(1, 2, 3, 2)

(2, 1, 3, 2)

(3, 1, 2, 2)

(2, 3, 2, 1)

(1, 2, 2, 3)

(2, 2, 1, 3)

(3, 2, 1, 2)

(3, 2, 2, 1)

(2, 3, 1, 2)

(2, 2, 3, 1)

(2, 1, 2, 3)


In [16]: runfile('/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py', wdir='/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20')

Reloaded modules: rtrace

(1, 3, 2, 2)

(1, 2, 3, 2)

(2, 1, 3, 2)

(3, 1, 2, 2)

(2, 3, 2, 1)

(1, 2, 2, 3)

(2, 2, 1, 3)

(3, 2, 1, 2)

(3, 2, 2, 1)

(2, 3, 1, 2)

(2, 2, 3, 1)

(2, 1, 2, 3)

NodoBinario(3,

NodoBinario(4,

None,

None),

NodoBinario(2,

NodoBinario(1,

None,

None),

None))


In [17]: runfile('/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py', wdir='/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20')

Reloaded modules: rtrace

(1, 3, 2, 2)

(1, 2, 3, 2)

(2, 1, 3, 2)

(3, 1, 2, 2)

(2, 3, 2, 1)

(1, 2, 2, 3)

(2, 2, 1, 3)

(3, 2, 1, 2)

(3, 2, 2, 1)

(2, 3, 1, 2)

(2, 2, 3, 1)

(2, 1, 2, 3)

NodoBinario(3,

NodoBinario(4, None, None,

None, ,

NodoBinario(2,

NodoBinario(1, None, None,


None, , None,

None, , None,


In [18]: runfile('/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py', wdir='/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20')

Reloaded modules: rtrace

(1, 3, 2, 2)

(1, 2, 3, 2)

(2, 1, 3, 2)

(3, 1, 2, 2)

(2, 3, 2, 1)

(1, 2, 2, 3)

(2, 2, 1, 3)

(3, 2, 1, 2)

(3, 2, 2, 1)

(2, 3, 1, 2)

(2, 2, 3, 1)

(2, 1, 2, 3)

NodoBinario(3,

NodoBinario(4, None, None,

None, ,

NodoBinario(2,

NodoBinario(1, None, None,


None, , None,

None, , None,


In [19]: runfile('/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py', wdir='/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20')

Reloaded modules: rtrace

(1, 3, 2, 2)

(1, 2, 3, 2)

(2, 1, 3, 2)

(3, 1, 2, 2)

(2, 3, 2, 1)

(1, 2, 2, 3)

(2, 2, 1, 3)

(3, 2, 1, 2)

(3, 2, 2, 1)

(2, 3, 1, 2)

(2, 2, 3, 1)

(2, 1, 2, 3)

NodoBinario(3,

NodoBinario(4, None, None,

) ,

NodoBinario(2,

NodoBinario(1, None, None,


) , None,

) , )


In [20]: runfile('/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py', wdir='/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20')

Reloaded modules: rtrace

(1, 3, 2, 2)

(1, 2, 3, 2)

(2, 1, 3, 2)

(3, 1, 2, 2)

(2, 3, 2, 1)

(1, 2, 2, 3)

(2, 2, 1, 3)

(3, 2, 1, 2)

(3, 2, 2, 1)

(2, 3, 1, 2)

(2, 2, 3, 1)

(2, 1, 2, 3)

NodoBinario(3,

NodoBinario(4, None, None, ) ,

NodoBinario(2,

NodoBinario(1, None, None, ) , None, ) , )


In [21]: runfile('/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py', wdir='/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20')

Reloaded modules: rtrace

File "/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py", line 116

retrun False

^

SyntaxError: invalid syntax



In [22]: runfile('/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py', wdir='/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20')

(1, 3, 2, 2)

(1, 2, 3, 2)

(2, 1, 3, 2)

(3, 1, 2, 2)

(2, 3, 2, 1)

(1, 2, 2, 3)

(2, 2, 1, 3)

(3, 2, 1, 2)

(3, 2, 2, 1)

(2, 3, 1, 2)

(2, 2, 3, 1)

(2, 1, 2, 3)

NodoBinario(3,

NodoBinario(4, None, None, ) ,

NodoBinario(2,

NodoBinario(1, None, None, ) , None, ) , )

False


In [23]: runfile('/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20/lezione16.py', wdir='/home/andrea/Documents/Uni/Didattica/Prog1/2020-21/Lezioni/lezione16-27-11-20')

Reloaded modules: rtrace

(1, 3, 2, 2)

(1, 2, 3, 2)

(2, 1, 3, 2)

(3, 1, 2, 2)

(2, 3, 2, 1)

(1, 2, 2, 3)

(2, 2, 1, 3)

(3, 2, 1, 2)

(3, 2, 2, 1)

(2, 3, 1, 2)

(2, 2, 3, 1)

(2, 1, 2, 3)

NodoBinario(3,

NodoBinario(4, None, None, ) ,

NodoBinario(2,

NodoBinario(1, None, None, ) , None, ) , )

True


In [24]: