Hi - further to my earlier query regarding partial matches (which with
all your replies enabled me to advance my understanding, thanks), I
now need to reverse a dict.
I know how to reverse a list (with the reverse method - very handy),
but it doesn't seem possible to reverse a dict.
I suspect what I need to do is somehow go from:
thelist=list(th edict)
thelist.reverse ()
thedict=dict(th elist)
Does anyone know how to convert / or reverse a dict?
thanks
kb.
all your replies enabled me to advance my understanding, thanks), I
now need to reverse a dict.
I know how to reverse a list (with the reverse method - very handy),
but it doesn't seem possible to reverse a dict.
I suspect what I need to do is somehow go from:
thelist=list(th edict)
thelist.reverse ()
thedict=dict(th elist)
Does anyone know how to convert / or reverse a dict?
thanks
kb.
Comment