How to I best pass multiple arguments to and from a function?
sneekula 969 Nearly a Posting Maven
Recommended Answers
Jump to PostYes, returning a tuple is considered the standard way to do it.
Jump to PostHere is a case where you don't know exactly how many arguments you will be passing to a Python function:
# explore the argument tuple designated by *args # used for cases where you don't know the number of arguments def sum_average(*args): size = len(args) sum = …
All 8 Replies

Mouche
jrcagle 77 Practically a Master Poster
vegaseat 1,735 DaniWeb's Hypocrite Team Colleague
Mouche commented: always really helpful with python +1
sneekula 969 Nearly a Posting Maven

Mouche
sneekula 969 Nearly a Posting Maven

Mouche
vegaseat 1,735 DaniWeb's Hypocrite Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.