Expansion by argument of python dictionary

>>> def main(u,i):
...     print "u are " + u
...     print "i am " + i
... 
>>> config = {}
>>> config["i"] = "me"
>>> config["u"] = "you"
>>> config
{'i': 'me', 'u': 'you'}
>>> 
>>> main(**config)
u are you
i am me
>>> main(*config)
u are i
i am u

Recommended Posts

Expansion by argument of python dictionary
[Python3] Call by dynamically specifying the keyword argument of the function
Basic grammar of Python3 system (dictionary)
Python dictionary
Behavior of python3 by Sakura's server
[Python] dictionary
Python dictionary
Story of power approximation by Python
Explanation of production optimization model by Python
Python> dictionary> values ()> Get All Values by Using values ()
[Learning memo] Basics of class by python
Conditional branching of Python learned by chemoinformatics
Grayscale by matrix-Reinventor of Python image processing-
Example of 3D skeleton analysis by Python
Pandas of the beginner, by the beginner, for the beginner [Python]
Analysis of X-ray microtomography image by Python
[Python] Memo dictionary
Introduction of Python
[Python] Dictionary (hash)
Python basics: dictionary
Basics of Python ①
Basics of python ①
Copy of python
Introduction of Python
[Introduction to Udemy Python 3 + Application] 26. Copy of dictionary
Basic operation list of Python3 list, tuple, dictionary, set
A memorandum of extraction by python bs4 request
How to get dictionary type elements of Python 2.7
About the * (asterisk) argument of python (and itertools.starmap)
Python> zip (* list4)> Matrix conversion> List and tuple argument expansion / dictionary argument expansion / local variable dictionary locals ()
Primality test by Python
[Python] Operation of enumerate
List of python modules
[Language processing 100 knocks 2020] Summary of answer examples by Python
Image processing by matrix Basics & Table of Contents-Reinventor of Python image processing-
Python Basic Course (7 Dictionary)
Python default argument trap
python variable expansion, format
[Python of Hikari-] Chapter 06-02 Function (argument and return value 1)
Communication processing by Python
List of posts related to optimization by Python to docker
Unification of Python environment
Copy of python preferences
Summary of Python sort (list, dictionary type, Series, DataFrame)
Summary of Python articles by pharmaceutical company researcher Yukiya
Basics of Python scraping basics
Python default argument behavior
[python] behavior of argmax
How to write a list / dictionary type of Python3
Usage of Python locals ()
the zen of Python
Python function argument summary
Installation of Python 3.3 rc1
[Introduction to Udemy Python3 + Application] 53. Dictionary of keyword arguments
Python3 List / dictionary memo
Convenient argument passing technique in Python (tuple, dictionary type)
Python Dictionary Beginner's Guide
# 4 [python] Basics of functions
Beamformer response by python
Basic knowledge of Python
Sober trivia of python3