Creating Unique Dictionary Variables from List

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Greg Corradini

    #1

    Creating Unique Dictionary Variables from List


    Hello All,
    I'm attempting to create multiple dictionaries at once, each with unique
    variable names. The number of dictionaries i need to create depends on the
    length of a list, which was returned from a previous function.
    The pseudo code for this problem would be:

    returnedlist = [x,y,z]
    count = 0
    for i in returnedlist:
    if count < len(returnedlis t):
    # then create a dictionary (beginning with variable dic) and add a
    unique ending such that
    # my final dictionary name would be dic + count for each i

    Any ideas about this?
    Greg


    --
    View this message in context: http://www.nabble.com/Creating-Uniqu....html#a9943320
    Sent from the Python - python-list mailing list archive at Nabble.com.

Working...