Yashotantra Academy
AI · Blockchain · Cloud · Data
Dark mode active
Learn
Tracks
ABCD
Certification
More
▾
Dark mode active
Learn
Tracks
ABCD
Certification
Study
Theory
Code Lab
Build
Solidity IDE
Staking Sandbox
Simulation
Reference
Wallets
Gas Fees
Explorers
← Code Lab
Python
0/50 solved · 0%
All lessons
lesson
code
Functions · easy
13. *args
Variadic positional arguments.
Write `total_supply(*amounts)` returning the sum of all given amounts.
Required in your answer:
*amounts
Reveal solution
Run & check
Reset
Runs via Pyodide
def total_supply(*amounts): # TODO pass
Output appears here.
← 12. Default arguments
14. Lambda and sorted →