4 ms·
If you have a dictionary "d" somewhere with the keys that should become keyword arguments then this would work: f(**{x:x for x in d})
by makecheck 11y ago
If you have a dictionary "d" somewhere with the keys that should become keyword arguments then this would work:
f(**{x:x for x in d})
- pramodliv1 11y agoOne can also do "{count} {apples}".format(locals()) if we are playing code golf. Well, star-star locals. I don't know how to write it according to https://news.ycombinator.com/formatdoc https://news.ycombinator.com/formatdoc