Re: fast dictionary initialization

2016-06-10 Thread Tim Chase
On 2016-06-10 14:07, maurice wrote: > example: > valuesList = [1,2,3] > keysList = ['1','2','3'] > > So the dictionary can basically convert string to int: > > dictionary = {'1':1, '2':2, '3':3} A couple similar options: The most straightforward translation of your description: opt1 = dic

Re: fast dictionary initialization

2016-06-10 Thread Random832
pOn Fri, Jun 10, 2016, at 17:07, maurice wrote: > Hi. If I have already a list of values, let's call it valuesList and the > keysList, both same sized lists, what is the easiest/quickest way to > initialize a dictionary with those keys and list, in terms of number of > lines perhaps? > > example:

fast dictionary initialization

2016-06-10 Thread maurice
Hi. If I have already a list of values, let's call it valuesList and the keysList, both same sized lists, what is the easiest/quickest way to initialize a dictionary with those keys and list, in terms of number of lines perhaps? example: valuesList = [1,2,3] keysList = ['1','2','3'] So the di

Re: dictionary initialization

2004-12-09 Thread Dan Perl
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi Dan > > I must confess that upon rereading my words, there is some irony there > (but not really sarcasm, is there?). However, I *really* tried to keep > my tone, well, professional. I realise I didn't do a good job and > apologise

Re: dictionary initialization

2004-12-09 Thread caleb . hattingh
Hi Dan I must confess that upon rereading my words, there is some irony there (but not really sarcasm, is there?). However, I *really* tried to keep my tone, well, professional. I realise I didn't do a good job and apologise. I hope that's ok. Keep well Caleb -- http://mail.python.org/mailma