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

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

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

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

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

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7431959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:22:45+00:00 2026-05-29T09:22:45+00:00

Just starting to figure Python out. I’ve read this question and its responses: Is

  • 0

Just starting to figure Python out. I’ve read this question and its responses:

Is it true that I can't use curly braces in Python?

and I still can’t fathom how curly braces work, especially since pages like Simple Programs:

http://wiki.python.org/moin/SimplePrograms

use curly braces all over the place. I understand square brackets and regular curved parentheses, but I don’t know what’s meant by “defining dictionaries” or what they’re supposed to represent.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T09:22:46+00:00Added an answer on May 29, 2026 at 9:22 am

    "Curly Braces" are used in Python to define a dictionary. A dictionary is a data structure that maps one value to another – kind of like how an English dictionary maps a word to its definition.

    Python:

    dict = {
        "a" : "Apple",
        "b" : "Banana",
    }
    

    They are also used to format strings, instead of the old C style using %, like:

    ds = ['a', 'b', 'c', 'd']
    x = ['has_{} 1'.format(d) for d in ds]
    
    print x
    
    ['has_a 1', 'has_b 1', 'has_c 1', 'has_d 1']
    

    They are not used to denote code blocks as they are in many "C-like" languages.

    C:

    if (condition) {
        // do this
    }
    

    Update: In addition to Python’s dict data types Python has (since Python 2.7) set as well, which uses curly braces too and are declared as follows:

    my_set = {1, 2, 3, 4}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm just starting with Python, and I can't figure out how to group tuples.
i have been trying to figure this out but i just can't.... for some
I'm just starting out in WinPhone development and can't figure out how to set
Just starting to learn scala.. I can't seem to figure out how to compile
I'm a newbie to Java and just starting to figure out the concept of
Has anyone done something like this? How? I'm just starting a project that will
I'm just starting out with Python and experimenting with different solutions. I was working
Please help me figure out what is going wrong here? just starting out in
I'm just starting to figure out regex and would love some help trying to
I'm just starting to try figure out how to go about continuous integration and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

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.