tegge-classroom / STAT2984-2018

STAT 2984: Statistical Programming I - Spring 2018
1 stars 13 forks source link

Dictionary issue #6

Open apappy56 opened 6 years ago

apappy56 commented 6 years ago

Is their a program or thing that you can install that makes creating a dictionary easier or do you always have to complete it manually?

nanaa9 commented 6 years ago

As far as I could find the curly brace method is the standard method of creating a dictionary. If the dictionary contains a specific type of values like the letters of the alphabet there are shortcuts you can use in Python to create that dictionary. I've copied some source links below.

Sources: https://developmentality.wordpress.com/2012/03/30/three-ways-of-creating-dictionaries-in-python/ https://stackoverflow.com/questions/453576/is-there-a-fast-way-to-generate-a-dict-of-the-alphabet-in-python