Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people's questions, and connect with other people.

Have an account? Sign In

Captcha Click on image to update the captcha.

Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have a permission to ask a question, You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here
Tech Answered Logo Tech Answered Logo
Sign InSign Up

Tech Answered

Tech Answered Navigation

  • Home
  • Tutorials
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • About Us
  • Blog
  • Contact Us
Home / Questions /Q 1771
Next
In Process
Priyanka Chakraborty
Priyanka Chakraborty

Priyanka Chakraborty

  • India
  • 10 Questions
  • 10 Answers
  • 0 Best Answers
  • 43 Points
View Profile
  • 1
Priyanka Chakraborty
Asked: May 6, 20212021-05-06T21:24:56+05:30 2021-05-06T21:24:56+05:30In: Python

How to create a dictionary in Python

  • 1

While working on Python how can i create a dictionary?

dictionarieskeywordsprogrammingpython
  • 1
  • 2,157
  • 0
  • 0
Answer
Share
  • Facebook

    Related Questions

    • which computer language is easy to learn
    • Python Program To Print Stars (*) In Different Patterns?
    • What Is The Python Program To Print The Calendar Of A Particular Month?
    • Write A Python Program To Accept A File Name From The User And Print The Extension Of The File Name.
    • Python Program To Count The Number Of Vowels In A Sentence?
    • Best Programming Language To Learn in 2021?
    • Youtube shorts hashtags for Views today

    1 Answer

    1. Ravi Ujjwal

      Ravi Ujjwal

      • India
      • 12 Questions
      • 68 Answers
      • 4 Best Answers
      • 242 Points
      View Profile
      Ravi Ujjwal
      2021-05-07T22:26:49+05:30Added an answer on May 7, 2021 at 10:26 pm

      Dictionary is nothing but a key value pair. It can be ordered or unordered. Handling dictionary in python is really very easy.

      var = {}

      var is now empty dictionary.

      We can fill the dictionary like this:

      var[key] = value

      Ex:
      var[0] = 'Tech'
      var[ 1] = 'Answered'
      var[ 2] =1
      You can also assess the dictionary like this:
      var[key]
      Ex: print(var[1])
      Output:  Answered

      References: https://www.geeksforgeeks.org/python-dictionary/

      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    Leave an answer

    Leave an answer
    Cancel reply

    Browse

    Sidebar

    Ask A Question

    More Questions

    • Himasree

      What is the difference between modules and packages in Python?

    • Swathi

      how to remove indentation error in python

    • Swathi

      what is the difference between list and tuple in python

    • Vipinkv

      Python Program To Print Stars (*) In Different Patterns?

    • Vipinkv

      What Is The Python Program To Print The Calendar Of

    • Krishna Vijayan

      Write A Python Program To Accept A File Name From

    • Vipinkv

      Python Program To Count The Number Of Vowels In A

    • arunraj503

      Addition of two numbers in Python using user input example

    Stats

    • Questions 1,988
    • Answers 2,095
    • Posts 12
    • Best Answers 73

    Related Questions

    • kranthi

      which computer language is easy to learn

    • Vipinkv

      Python Program To Print Stars (*) In Different Patterns?

    • Vipinkv

      What Is The Python Program To Print The Calendar Of A Particular

    • Krishna Vijayan

      Write A Python Program To Accept A File Name From The User

    • Vipinkv

      Python Program To Count The Number Of Vowels In A Sentence?

    • Vipinkv

      Best Programming Language To Learn in 2021?

    • Mingle tap

      Youtube shorts hashtags for Views today

    • kiran kumar85

      Gaming tags for YouTube latest gaming YouTube keywords

    Explore

    • Home
    • Communities
    • Questions
      • New Questions
      • Trending Questions
      • Must read Questions
      • Hot Questions
    • Polls
    • Tags
    • Badges
    • Users
    • Help

    Footer

    Recent Comments

    • shree on How to use philips citrus press juicer 25 watts Demo
    • kiran kumar85 on How To Insert Names Automatically in Excel Sheet With VBA Code
    • Satish on How To Insert Names Automatically in Excel Sheet With VBA Code
    • jameslaurence on alarm won’t go off while on facetime how to fix
    • jameslaurence on how to solve export problem in kinemaster
    Ask A Question

    Archives

    Tags

    laptop buying guide (1) limit google news notifications (1) printer buying guide (1) stop google news notifications (1) turn off google news notifications (1)

    Social media

    © 2023 @ Techanswered.com.
    Terms, Privacy policy & Sitemap.

    Insert/edit link

    Enter the destination URL

    Or link to existing content

      No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.