As I understand update() is used to merge two dictionaries,
for example
D={'a':1, 'b':2}
E={'b':4,'c':6}
D.update(E)
D
{'a': 1, 'c': 6, 'b': 4}
But what is the role of **F?
D={'a':1, 'b':2}
E={'b':4,'c':6}
D.update(E, a=3)
D
{'a': 3, 'c': 6, 'b': 4}
Ciao, Marc.
--
Hi,
Don't think it will do much good. I need to get them from a file and
extract the last folder in the path. For example:
if I get c:\dos\util
I want to extract the string \util
Still, os.path is your friend:
import os
filepath = r'C:\dos\util'
base, last = os.path.split(filepath)
Hi Malcolm,
It's not the amout of code thats a probelm, it's following the
logic and structure thats important.
As I said Python.. UGH!
Do you find
.. s = This is a sentence of words
.. a = s.split(' ')
less readable or logical than
.. s = This is a sentence of words
.. For i = 1 to