If you want to pass dictionary items as function arguments in python? Define the function with the variable names as normal (but use klass for class, you can’t use reserved words):
1 2 3 4 5 | def my_function(school, city, klass, name): schoolname = school cityname = city standard = klass studentname = name |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.