0
return doesn't work
in this simple function, return doesn't work: def test(n) a=n return a test(5) why?
7 Antworten
+ 1
return cant print a value alone. if you want to print your value you should use print like this:
print(test(5))
0
thanks, works!!
in many guides it's not reported, why?
0
i dont know but i can tell you that you can use like this:
x=test(5)
print(x)
0
can i ask you also how remove a value from a lista?
thanks in advance
0
I think that you cant remove a value from a list.
if you want to do it you should rewrite it but just all values that you want and if dont rewrite a value it will remove
0
ok, have a nice day
thanks
0
Your welcome.
Good luck and have a nice day.