+ 2

how can i show in the output all of the steps that that function displays?

A recursion exemple. https://code.sololearn.com/c4GeyCIj5QaV/?ref=app

19th Oct 2019, 1:03 PM
爱人么你
爱人么你 - avatar
2 Respostas
+ 3
It's just the creation of a string you like to return. use f-string, because it's much more convenient: return f'{level}, {level_g(level-1)},level = {l} + {ll}' # output is: 5, 4, 3, 2, 1,level = 2 + 1,level = 3 + 2,level = 4 + 3,level = 5 + 4
19th Oct 2019, 1:52 PM
Lothar
Lothar - avatar