Like let's say I have an array with numbers [1, 2, 3, 4, etc.] and I want to get all of them except the last one in the *args and the last one in another arg. How can I do that?
4/22/2021 9:01:03 AM
args = args[:-1] # every arg but the last
args.append(<whatever>) # put whatever on the end
According to the Tutorial, Python Core 95.1:
The parameter *args must come after the named parameters to a function.
The name args is just a convention; you can choose to use another.
Rik Wittkopp I just saw that but thank you.
Slick Thank you
Send us a message