How can I write a function with an argument, return the list as a value and add one to it? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can I write a function with an argument, return the list as a value and add one to it?

My function is add_one. As far as I know I'm supposed to enter add_one=[], add_one = ([1, 2, 3)]

14th Sep 2019, 1:55 AM
Jennifer Palmer
Jennifer Palmer - avatar
2 Answers
+ 2
you should show us the code you have done so far. Then we can help you for sure.
14th Sep 2019, 7:10 AM
Lothar
Lothar - avatar
0
That is the code I have done so far because it's asked me to call the function add_one and so I type def add_one(1,2,3) and that's all I know how to do bc I don't have any good resources for learning this stuff
14th Sep 2019, 12:13 PM
Jennifer Palmer
Jennifer Palmer - avatar