RE: What is the role of F in dict(E, **F)

2005-09-05 Thread Marc Boeren
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. --

RE: RE Despair - help required

2005-08-25 Thread Marc Boeren
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)

RE: Strings for a newbie

2005-05-27 Thread Marc Boeren
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