Re: Worthwhile to reverse a dictionary



What is the difference between

" d1 = {'A' : '1', 'B' : '2', 'C' : '3'} "

and

" d1 = dict(A = 1, B = 2, C = 3) " ?

All of the dictionary examples I saw (python.org, aspn.activestate.com,
Learning Python by Lutz, among others) use d={'x' : 'y'}.

.