4 ms·
def L(*vargs): return vargs tada. >>> stuff = ['c','d','e'] >>> L('a','b', *stuff) ('a', 'b', 'c', 'd', 'e') Just like that.
by deckiedan 11y ago
def L(*vargs):
return vargs
tada.
>>> stuff = ['c','d','e']
>>> L('a','b', *stuff)
('a', 'b', 'c', 'd', 'e')
Just like that.
- indosauros 11y ago>>> L(*stuff, 'a', 'b') SyntaxError: only named arguments may follow *expression >>> L(*stuff, *stuff) SyntaxError: invalid syntax
- deckiedan 11y agoGood point... yes, having it language-level supported does add a lot of good stuff...