+ 6
How to print list using recursion.
this is my code but output is not right. https://code.sololearn.com/c75y6X4djoEC/?ref=app i want full list [1,2,3,4] why it giving me only [2,3,4]
8 ответов
+ 3
Aadrita thanks for help me but it does not work, never give up.
+ 3
Aadrita oh sorry i forget to add square brackets in last line thanks man.
+ 2
Kevin Dietrichstein it's just experiment.
+ 2
0
what are you trying to achieve with this code?
just to print it like print([1, 2, 3, 4]) ?
0
def printlist (list,l):
if (l>=len(list)):
return
print(list[l])
return printlist (list,l+1)
list=[1,2,3,4,5]
printlist (list,0)
0
Muhammad Hashir Mohsneen can you help me out with a problem ?
0
Can you please tell me that what to add for solving the question in functions by recursion to print values?