PGDCA, BCA, B-Tech, MCA, M-Tech, B.Sc computer science राजस्थान सूचना सहायक व कंप्यूटर शिक्षक विशेष नोट्स: इस अध्याय में हम Arbitrary Arguments: *args (Tuple) and **kwargs (Dictionary) (वेरिएबल आर्गुमेंट्स: *args (टपल) और **kwargs (डिक्शनरी)) की संपूर्ण थ्योरी, मुख्य तकनीकी बिंदु, तुलनात्मक तालिका और विगत परीक्षाओं के पैटर्न पर आधारित 20 अति-महत्वपूर्ण बहुविकल्पीय प्रश्न (MCQs) विस्तृत हिंदी व अंग्रेजी व्याख्या सहित पढ़ेंगे।
Overview: Python supports variadic functions using *args to collect arbitrary excess positional arguments into a tuple and **kwargs to collect arbitrary excess keyword arguments into a dictionary. At call sites, the same * and ** operators perform the inverse action, unpacking iterables and dictionaries into positional and keyword arguments.
अध्याय सार: पायथन में *args अतिरिक्त पोजिशनल आर्गुमेंट्स को एक टपल (tuple) में और **kwargs अतिरिक्त कीवर्ड आर्गुमेंट्स को एक डिक्शनरी (dict) में एकत्र करके वेरिएबल-लेंथ फंक्शन बनाने की सुविधा देते हैं। कॉल करते समय यही * और ** ऑपरेटर विपरीत कार्य करते हुए किसी इटरेबल और डिक्शनरी को क्रमशः पोजिशनल व कीवर्ड आर्गुमेंट्स में अनपैक कर देते हैं।
Arbitrary Arguments: *args (Tuple) and **kwargs (Dictionary): Detailed Notes & Architecture (वेरिएबल आर्गुमेंट्स: *args (टपल) और **kwargs (डिक्शनरी))
1. Packing Positional Arguments with *args (*args से पोजिशनल आर्गुमेंट्स पैक करना)
[EN] Prefixing a parameter with a single asterisk (*args) allows a function to receive zero or more excess positional arguments beyond its explicit positional parameters. Inside the function body, args is always an immutable tuple—if no extra positional arguments are supplied, args evaluates to an empty tuple (). Although 'args' is the universal PEP 8 convention, the name itself is not special; *numbers or *items behave identically because the single * operator drives packing. Any parameters listed after *args in the definition automatically become keyword-only parameters.
[HI] पैरामीटर से पहले एक तारांकन (*args) लगाने पर फंक्शन अपने निश्चित पोजिशनल पैरामीटर्स के बाद शून्य या अधिक अतिरिक्त पोजिशनल आर्गुमेंट्स ले सकता है। फंक्शन के भीतर `args` हमेशा एक टपल (`tuple`) होता है—कोई अतिरिक्त मान न मिलने पर यह खाली टपल `()` रहता है। `args` नाम केवल PEP 8 की प्रथा है, कोई कीवर्ड नहीं; `*numbers` या `*items` भी ठीक उसी तरह काम करते हैं क्योंकि मुख्य कार्य `*` ऑपरेटर करता है। परिभाषा में `*args` के बाद आने वाला कोई भी पैरामीटर स्वतः कीवर्ड-ओनली बन जाता है।
2. Packing Keyword Arguments with **kwargs (**kwargs से कीवर्ड आर्गुमेंट्स पैक करना)
[EN] Prefixing a parameter with a double asterisk (**kwargs) captures any extra keyword arguments that do not match named parameters in the signature. Inside the function, kwargs is always a standard dictionary (dict) mapping string parameter names to their passed values, preserving insertion order since Python 3.7. If no unmatched keyword arguments are passed, kwargs defaults to an empty dictionary {}; like *args, any valid identifier such as **options works. Because **kwargs absorbs arbitrary named parameters, it must appear last in the parameter list, and a function can have at most one *args and one **kwargs.
[HI] डबल तारांकन (**kwargs) लगाने से वे सभी अतिरिक्त कीवर्ड आर्गुमेंट्स एकत्र हो जाते हैं जो फंक्शन हेडर के किसी नामित पैरामीटर से मेल नहीं खाते। फंक्शन के अंदर `kwargs` हमेशा एक `dict` होता है जिसमें स्ट्रिंग कुंजियाँ और उनके मान होते हैं (पायथन 3.7 से प्रविष्टि क्रम सुरक्षित रहता है)। कोई अतिरिक्त कीवर्ड न होने पर यह खाली `{}` रहता है; `**options` जैसे किसी भी नाम का उपयोग किया जा सकता है। `**kwargs` हमेशा पैरामीटर सूची के सबसे अंत में आता है और एक फंक्शन में अधिकतम एक `*args` तथा एक `**kwargs` हो सकता है।
3. Mandatory Parameter Ordering in Function Signatures (फंक्शन सिग्नेचर में अनिवार्य पैरामीटर क्रम)
[EN] When combining all parameter categories in one Python 3.8+ function definition, they must follow the strict order: (pos_only, /, standard, *args, kw_only, **kwargs). For example, `def api(a, /, b, *args, flag=False, **kwargs):` binds a positionally, b positionally or by keyword, extra positional values to args, flag by keyword only, and remaining keys to kwargs. Putting **kwargs before *args or placing standard positional parameters after *args violates grammar rules (note: anything after *args is parsed as keyword-only, whereas anything after **kwargs raises SyntaxError). This structure empowers decorators and wrapper functions via `def wrapper(*args, **kwargs): return fn(*args, **kwargs)`.
[HI] एक ही पायथन 3.8+ फंक्शन में सभी प्रकार के पैरामीटर्स का अनिवार्य क्रम होता है: `(pos_only, /, standard, *args, kw_only, **kwargs)`। उदाहरण के लिए `def api(a, /, b, *args, flag=False, **kwargs):` में `a` पोजिशनल-ओनली, `b` मानक, अतिरिक्त पोजिशनल `args` में, `flag` कीवर्ड-ओनली और शेष कीवर्ड `kwargs` में जाते हैं। परिभाषा में `**kwargs` के बाद कोई भी पैरामीटर लिखना या `*args` से पहले `**kwargs` रखना `SyntaxError` उत्पन्न करता है। यही पैटर्न डेकोरेटर्स में `def wrapper(*args, **kwargs): return fn(*args, **kwargs)` लिखने की शक्ति देता है।
4. Unpacking Arguments at the Call Site (* and **) (कॉल-साइट पर आर्गुमेंट्स अनपैक करना (* और **))
[EN] While * and ** in a `def` header pack incoming values into tuple and dict, placing * and ** in a function call unpacks containers outward into individual arguments. Using `fn(*my_list)` passes each element of `my_list` (or any iterable like a generator, set, or string) as a separate positional argument. Using `fn(**my_dict)` unpacks key-value pairs into keyword arguments, requiring every key in `my_dict` to be a string (`str`), otherwise Python raises TypeError: keywords must be strings. Since Python 3.5 (PEP 448), multiple `*` and `**` unpackings may appear in a single call, though duplicate keys across unpacked dicts trigger TypeError.
[HI] `def` हेडर में `*` और `**` मानों को टपल और डिक्शनरी में पैक करते हैं, जबकि फंक्शन कॉल में `*` और `**` कंटेनरों को अलग-अलग आर्गुमेंट्स में अनपैक करते हैं। `fn(*my_list)` लिखने पर लिस्ट (या किसी भी इटरेबल जैसे टपल, स्ट्रिंग, जनरेटर) का प्रत्येक तत्व अलग पोजिशनल आर्गुमेंट बन जाता है। `fn(**my_dict)` लिखने पर डिक्शनरी की सभी जोड़ियाँ कीवर्ड आर्गुमेंट्स बन जाती हैं, बशर्ते सभी कुंजियाँ स्ट्रिंग (`str`) हों, अन्यथा TypeError आता है। पायथन 3.5 (PEP 448) से एक ही कॉल में कई `*` व `**` अनपैकिंग संभव हैं, लेकिन डुप्लिकेट कुंजी मिलने पर TypeError आता है।
Syntax, Formula & Technical Example (Arbitrary Arguments: *args (Tuple) and **kwargs (Dictionary))
def report(title, *scores, **meta):
print(type(scores).__name__, scores)
print(type(meta).__name__, meta)
return f"{title}: avg={sum(scores)/len(scores):.1f}"
print(report("IA", 80, 90, 100, center="Jaipur"))
# Output:
# tuple (80, 90, 100)
# dict {'center': 'Jaipur'}
# IA: avg=90.0
Arbitrary Arguments: *args (Tuple) and **kwargs (Dictionary) Quick Reference & Comparison Table
| Syntax Form | Collected / Unpacked Type | Key Rule / Constraint |
|---|---|---|
| *args in def | tuple (immutable sequence) | Collects 0+ excess positional arguments |
| **kwargs in def | dict (string keys) | Collects 0+ excess keyword args; must be last |
| *iterable in call | Unpacks iterable elements | Expands into separate positional arguments |
| **mapping in call | Unpacks dict key-value pairs | All dict keys must be str else TypeError |
Arbitrary Arguments: *args (Tuple) and **kwargs (Dictionary) Top 20 Bilingual MCQs with Answers
Q1. Inside `def func(*args):`, what is the exact Python data type of `args`?
(`def func(*args):` के भीतर `args` का वास्तविक डेटा टाइप क्या होता है?)
(A) dict
(B) tuple
(C) list
(D) set
Correct Answer: (B)
[EN] *args always packs excess positional arguments into an immutable tuple.
[HI] *args अतिरिक्त पोजिशनल आर्गुमेंट्स को हमेशा एक अपरिवर्तनीय tuple में पैक करता है।
Q2. Inside `def func(**kwargs):`, what is the exact Python data type of `kwargs`?
(`def func(**kwargs):` के भीतर `kwargs` का वास्तविक डेटा टाइप क्या होता है?)
(A) tuple
(B) frozenset
(C) list
(D) dict
Correct Answer: (D)
[EN] **kwargs always collects excess keyword arguments into a standard Python dict.
[HI] **kwargs अतिरिक्त कीवर्ड आर्गुमेंट्स को हमेशा एक Python dict में एकत्र करता है।
Q3. What does `def f(*args, **kwargs): return args, kwargs` return when called with zero arguments `f()`?
(`def f(*args, **kwargs): return args, kwargs` को बिना किसी आर्गुमेंट के `f()` कॉल करने पर क्या लौटता है?)
(A) ([], {})
(B) Raises TypeError
(C) ((), {})
(D) (None, None)
Correct Answer: (C)
[EN] With zero arguments, *args becomes an empty tuple () and **kwargs becomes an empty dict {}.
[HI] बिना किसी आर्गुमेंट के कॉल करने पर *args खाली टपल () और **kwargs खाली डिक्शनरी {} बन जाता है।
Q4. Are the identifiers `args` and `kwargs` reserved Python keywords?
(क्या `args` और `kwargs` पायथन के आरक्षित कीवर्ड हैं?)
(A) Yes; both appear in keyword.kwlist
(B) Yes; renaming them to *items raises SyntaxError
(C) No; they are naming conventions, and * and ** perform the packing
(D) args is a keyword but kwargs is not
Correct Answer: (C)
[EN] Only `*` and `**` carry syntactic meaning; `*vals` and `**opts` work identically.
[HI] नहीं; ये केवल नामकरण परंपराएँ हैं। पैकिंग का कार्य `*` और `**` ऑपरेटर करते हैं, इसलिए `*vals` व `**opts` भी मान्य हैं।
Q5. Which function header has a syntactically VALID parameter order?
(इनमें से किस फंक्शन हेडर में पैरामीटर्स का क्रम सिंटैक्स की दृष्टि से वैध (VALID) है?)
(A) def f(a, **kwargs, *args):
(B) def f(**kwargs, *args, a, b=1):
(C) def f(*args, **kwargs, b=1):
(D) def f(a, *args, b=1, **kwargs):
Correct Answer: (D)
[EN] Standard positional parameters come before *args, keyword-only parameters follow *args, and **kwargs must always come last.
[HI] मानक पैरामीटर *args से पहले, कीवर्ड-ओनली *args के बाद, और **kwargs हमेशा अंत में आता है; **kwargs के बाद कुछ भी लिखने पर SyntaxError आता है।
Q6. What does this print? def fn(a, *b, c=10): return a + sum(b) + c print(fn(1, 2, 3))
(निम्न कोड क्या प्रिंट करेगा? def fn(a, *b, c=10): return a + sum(b) + c print(fn(1, 2, 3)))
(A) SyntaxError
(B) 6
(C) TypeError
(D) 16
Correct Answer: (D)
[EN] a=1, *b collects (2, 3), and c uses its keyword-only default 10, so 1 + (2+3) + 10 = 16.
[HI] a=1 लेता है, *b में (2, 3) पैक होते हैं, और कीवर्ड-ओनली c डिफ़ॉल्ट 10 लेता है; कुल योग 16 होगा।
Q7. What happens if you try to pass `c` positionally in `def fn(a, *b, c=10):` as `fn(1, 2, 3, 4)`?
(`def fn(a, *b, c=10):` में `fn(1, 2, 3, 4)` की तरह पोजिशनल मान देने पर `c` का मान क्या होगा?)
(A) SyntaxError
(B) TypeError
(C) b collects (2, 3, 4) and c stays 10 because c is keyword-only
(D) c becomes 4 and b becomes (2, 3)
Correct Answer: (C)
[EN] *args absorbs all excess positional arguments, so parameters after *args can only be set by keyword (`c=4`).
[HI] *args सभी अतिरिक्त पोजिशनल आर्गुमेंट्स को सोख लेता है, इसलिए इसके बाद वाला c केवल कीवर्ड (`c=4`) से ही बदला जा सकता है।
Q8. What is the output of: def show(x, y, z): print(x, y, z) vals = [10, 20, 30] show(*vals)
(निम्न कोड का आउटपुट क्या होगा? def show(x, y, z): print(x, y, z) vals = [10, 20, 30] show(*vals))
(A) TypeError: missing y and z
(B) [10, 20, 30] None None
(C) 10 20 30
(D) (10, 20, 30)
Correct Answer: (C)
[EN] In a function call, `*vals` unpacks the 3-element list into three positional arguments x=10, y=20, z=30.
[HI] फंक्शन कॉल में `*vals` 3 तत्वों की लिस्ट को तीन अलग पोजिशनल आर्गुमेंट्स x=10, y=20, z=30 में अनपैक कर देता है।
Q9. What error occurs when unpacking a dictionary with integer keys using `fn(**{1: 'a'})`?
(`fn(**{1: 'a'})` के जरिए पूर्णांक (int) कुंजी वाली डिक्शनरी को अनपैक करने पर कौन-सी त्रुटि आती है?)
(A) SyntaxError
(B) ValueError
(C) TypeError: keywords must be strings
(D) KeyError: 1
Correct Answer: (C)
[EN] Keyword arguments in Python calls require string identifiers as keys, so integer keys in `**d` raise TypeError.
[HI] पायथन कॉल में कीवर्ड आर्गुमेंट्स के नाम हमेशा स्ट्रिंग होने चाहिए, इसलिए `**d` में पूर्णांक कुंजी होने पर TypeError आता है।
Q10. Can a single function definition contain two `*args` parameters, such as `def f(*a, *b):`?
(क्या किसी एक फंक्शन परिभाषा में दो `*args` पैरामीटर (`def f(*a, *b):`) हो सकते हैं?)
(A) No; SyntaxError: * argument may appear only once
(B) Yes; *b remains empty
(C) Yes; *a takes odd args and *b takes even args
(D) Only in Python 3.11+
Correct Answer: (A)
[EN] A function signature permits at most one `*args` parameter and at most one `**kwargs` parameter.
[HI] एक फंक्शन सिग्नेचर में अधिकतम एक `*args` और अधिकतम एक `**kwargs` ही हो सकते हैं; दूसरा लिखने पर SyntaxError आता है।
Q11. What does `def f(a, **kw): return a, kw; print(f(1, a=2))` raise?
(`def f(a, **kw): return a, kw` को `f(1, a=2)` के रूप में कॉल करने पर क्या होता है?)
(A) SyntaxError
(B) Returns (2, {})
(C) TypeError: f() got multiple values for argument 'a'
(D) Returns (1, {'a': 2})
Correct Answer: (C)
[EN] Because `a` is an explicit positional-or-keyword parameter already bound to 1, `a=2` collides with `a` rather than entering `kw`.
[HI] `a` एक सामान्य पैरामीटर है जो पहले ही 1 से जुड़ चुका है, अतः `a=2` `kw` में जाने के बजाय टकराकर TypeError देता है।
Q12. How do Python decorators preserve arbitrary signatures of wrapped functions?
(पायथन डेकोरेटर्स रैप किए गए फंक्शन्स के मनचाहे सिग्नेचर को कैसे सुरक्षित रखते हैं?)
(A) By defining `def wrapper(*args, **kwargs): return func(*args, **kwargs)`
(B) By requiring every wrapped function to have zero arguments
(C) By converting all arguments to strings with eval()
(D) By using global variables instead of parameters
Correct Answer: (A)
[EN] Packing all positional/keyword arguments via `*args, **kwargs` and forwarding them with `*args, **kwargs` lets a wrapper handle any signature.
[HI] `*args, **kwargs` से सभी आर्गुमेंट्स पैक करके अंदर `func(*args, **kwargs)` में अनपैक कर देने से रैपर हर सिग्नेचर को संभाल लेता है।
Q13. What happens when you write `def f(*, **kwargs):` (bare `*` followed directly by `**kwargs`)?
(`def f(*, **kwargs):` (अकेले `*` के तुरंत बाद `**kwargs`) लिखने पर क्या होता है?)
(A) RuntimeError
(B) Valid: accepts zero positional and arbitrary keyword arguments
(C) SyntaxError: named arguments must follow bare *
(D) Valid in Python 3.10+
Correct Answer: (C)
[EN] A bare `*` must be followed by at least one named keyword-only parameter; `**kwargs` alone already accepts arbitrary keywords without needing bare `*`.
[HI] अकेले `*` के बाद कम से कम एक नामित कीवर्ड-ओनली पैरामीटर होना आवश्यक है; अन्यथा SyntaxError आता है।
Q14. What is printed by: d1 = {'a': 1} d2 = {'b': 2} def add(a, b): return a + b print(add(**d1, **d2))
(निम्न कोड का आउटपुट क्या होगा? d1 = {'a': 1} d2 = {'b': 2} def add(a, b): return a + b print(add(**d1, **d2)))
(A) SyntaxError
(B) 3
(C) {'a': 1, 'b': 2}
(D) TypeError
Correct Answer: (B)
[EN] Since Python 3.5 (PEP 448), multiple `**` dictionary unpackings are permitted in a single call as long as keys do not conflict.
[HI] पायथन 3.5 (PEP 448) से एक ही कॉल में एकाधिक `**` डिक्शनरी अनपैक करना मान्य है, बशर्ते कुंजियाँ दोहराई न जाएं।
Q15. What does `def count_chars(*args): return len(args); print(count_chars(*'PY'))` print?
(`def count_chars(*args): return len(args); print(count_chars(*'PY'))` क्या प्रिंट करेगा?)
(A) TypeError
(B) 1
(C) SyntaxError
(D) 2
Correct Answer: (D)
[EN] Because a string is iterable, `*'PY'` unpacks into two separate positional arguments `'P'` and `'Y'`, so `len(args)` is 2.
[HI] चूँकि स्ट्रिंग एक इटरेबल है, `*'PY'` दो अलग पोजिशनल आर्गुमेंट्स `'P'` और `'Y'` में अनपैक होता है, जिससे `len(args)` का मान 2 आता है।
Q16. Which statement about `*args` and `**kwargs` is NOT true?
(`*args` और `**kwargs` के बारे में निम्नलिखित में से कौन-सा कथन असत्य (NOT true) है?)
(A) Parameters placed after `*args` become keyword-only
(B) `*args` collects excess positional arguments into a mutable list
(C) `**kwargs` collects unmatched keyword arguments into a dict
(D) In a call, `*seq` unpacks elements as positional arguments
Correct Answer: (B)
[EN] `*args` always creates an immutable `tuple`, never a `list`.
[HI] `*args` अतिरिक्त पोजिशनल आर्गुमेंट्स को कभी भी `list` में नहीं, बल्कि हमेशा अपरिवर्तनीय `tuple` में पैक करता है।
Q17. Within Arbitrary Arguments: *args (Tuple) and **kwargs (Dictionary), which syntax form directly maps to: "tuple (immutable sequence)"?
(Arbitrary Arguments: *args (Tuple) and **kwargs (Dictionary) में कौन सा Syntax Form सीधे "tuple (immutable sequence)" से संबंधित है?)
(A) *iterable in call
(B) *args in def
(C) **mapping in call
(D) **kwargs in def
Correct Answer: (B)
[EN] In Arbitrary Arguments: *args (Tuple) and **kwargs (Dictionary), '*args in def' handles 'tuple (immutable sequence)' (Collects 0+ excess positional arguments).
[HI] Arbitrary Arguments: *args (Tuple) and **kwargs (Dictionary) में '*args in def' का कार्य/विवरण 'tuple (immutable sequence)' (Collects 0+ excess positional arguments) है।
Q18. Which option accurately describes '**kwargs in def' in Arbitrary Arguments: *args (Tuple) and **kwargs (Dictionary)?
(Arbitrary Arguments: *args (Tuple) and **kwargs (Dictionary) के संदर्भ में '**kwargs in def' की सही विशेषता कौन सी है?)
(A) Unpacks dict key-value pairs
(B) tuple (immutable sequence)
(C) dict (string keys)
(D) Unpacks iterable elements
Correct Answer: (C)
[EN] '**kwargs in def' provides 'dict (string keys)' — key point: Collects 0+ excess keyword args; must be last.
[HI] '**kwargs in def' का मुख्य विवरण 'dict (string keys)' है (Collects 0+ excess keyword args; must be last)।
Q19. In Arbitrary Arguments: *args (Tuple) and **kwargs (Dictionary), identify the correct parameter for the specification: "Unpacks iterable elements".
(Arbitrary Arguments: *args (Tuple) and **kwargs (Dictionary) में "Unpacks iterable elements" विवरण किस विकल्प के लिए सही है?)
(A) *args in def
(B) **mapping in call
(C) **kwargs in def
(D) *iterable in call
Correct Answer: (D)
[EN] '*iterable in call' corresponds to 'Unpacks iterable elements' (Expands into separate positional arguments).
[HI] '*iterable in call' का संबंध 'Unpacks iterable elements' (Expands into separate positional arguments) से है।
Q20. Considering Arbitrary Arguments: *args (Tuple) and **kwargs (Dictionary), what key behavior defines '**mapping in call'?
(Arbitrary Arguments: *args (Tuple) and **kwargs (Dictionary) में '**mapping in call' की मुख्य भूमिका या मान क्या है?)
(A) dict (string keys)
(B) Unpacks dict key-value pairs
(C) Unpacks iterable elements
(D) tuple (immutable sequence)
Correct Answer: (B)
[EN] '**mapping in call' represents 'Unpacks dict key-value pairs' (All dict keys must be str else TypeError).
[HI] '**mapping in call' का अर्थ/मान 'Unpacks dict key-value pairs' है (All dict keys must be str else TypeError)।
Arbitrary Arguments: *args (Tuple) and **kwargs (Dictionary) — Exam FAQs
Q1: Can I modify `args` directly inside a function using `args.append(5)`?
क्या मैं फंक्शन के भीतर `args.append(5)` लिखकर `args` में नया तत्व जोड़ सकता हूँ?
[EN] No. Because `args` is a `tuple`, calling `.append()` raises `AttributeError: 'tuple' object has no attribute 'append'`. Convert it via `list(args)` first if you need mutability.
[HI] नहीं। चूँकि `args` एक `tuple` है, `.append()` पर `AttributeError` आएगा। बदलाव के लिए पहले `list(args)` बनाएं।
Q2: Why does Python allow `def f(x, *args):` without passing any `*args` values?
पायथन बिना कोई अतिरिक्त मान भेजे भी `def f(x, *args):` को कॉल करने की अनुमति क्यों देता है?
[EN] Because `*args` represents zero or more optional excess positional arguments; when none are given beyond `x`, `args` is simply bound to the empty tuple `()`.
[HI] क्योंकि `*args` शून्य या अधिक वैकल्पिक पोजिशनल आर्गुमेंट्स के लिए है; `x` के अलावा कोई मान न मिलने पर `args` खाली टपल `()` रहता है।
Q3: What happens if two unpacked dictionaries in `fn(**d1, **d2)` share the same key?
यदि `fn(**d1, **d2)` में अनपैक की गई दोनों डिक्शनरियों में कोई समान कुंजी हो तो क्या होता है?
[EN] Unlike dict literal merging `{**d1, **d2}` where later keys overwrite earlier ones, passing duplicate keys in a function call raises `TypeError: got multiple values for keyword argument`.
[HI] डिक्शनरी मर्ज `{**d1, **d2}` के विपरीत (जहाँ बाद वाला मान जीतता है), फंक्शन कॉल में समान कुंजी होने पर `TypeError` उत्पन्न होता है।
Post a Comment
Post a Comment