Skip to content

Instantly share code, notes, and snippets.

@Manuel4131
Created January 31, 2018 06:03
Show Gist options
  • Save Manuel4131/e7af0b3ee8e01eb31f1feca476d6a517 to your computer and use it in GitHub Desktop.
Save Manuel4131/e7af0b3ee8e01eb31f1feca476d6a517 to your computer and use it in GitHub Desktop.
args kwargs
https://pythontips.com/2013/08/04/args-and-kwargs-in-python-explained/
Workable!
---python
def stupid(data, *args, **kwargs):
print("data: {}".format(data))
for i in args:
print(i)
for k in kwargs:
print("{} {}".format(k,kwargs.get(k)))
time=(1,3,5,7)
cap = {'uk':"London", 'de':'Berlin', 'nl':"Amasterdam"}
data = 'infor'
stupid(data, *time, **cap)
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment