In Python dictionary key value pairs are separated by :

2023

In Python dictionary key value pairs are separated by :

  1. A.

    :

  2. B.

    #

  3. C.

    !

  4. D.

    $

Attempted by 1313 students.

Show answer & explanation

Correct answer: A

In Python, a dictionary is defined using curly braces {} and key-value pairs are separated by a colon (:). For example, {'name': 'Alice', 'age': 25} uses : to link each key to its value.

हिन्दी उत्तर: पायथन में डिक्शनरी को कर्ली ब्रैकेट {} का उपयोग करके परिभाषित किया जाता है और की-वैल्यू जोड़े को कोलन (:) द्वारा अलग किया जाता है। उदाहरण के लिए, {'name': 'Alice', 'age': 25} में : प्रत्येक की को उसके मान से जोड़ता है।

Explore the full course: Hpsc Pgt Computer Science