0
How to call 2 arguments Inna for loop visit the code in the link and help me thank you
I have 4 arguments and I only need 2 how to call them https://code.sololearn.com/cuquo3Vomaqf/?ref=app
3 Respuestas
+ 3
I don't think you understand what the term "argument" means in programming. An argument in programming is a specific value given to a function:
def sayHi(name,age):
print("Hello, "+name+"! You are age "+age+"!")
sayHi("Luke Skywalker",19)
In the above code, when I call sayHi, my arguments are "Luke Skywalker" and "19".
For your code, you've not specified *which* of the four array elements you wish to keep, and which you wish to discard. Normally, the way to do that would be to use an if statement or a filter:
filter(someFilterFunction,array_you_wanna_filter)
0
U can use a while loop with a var i and this start 0 and u can use print(list[i], list[i+1])
i+=2