Girish Sahani schrieb: > Yes it is the former of course.Common elements could be in any order in > both strings. > Thanks Marc :)...though we need to add an if for checking the length of > the string (k+1). >
No, why? Every character from string1 is removed from string2 at most once. And string2 is added to string1 if and only if it has length 1; if not, string1 is set to the empty string. So either string1 is empty or it has length k+1. Or did you mean checking if string1 is empty? -- Dr. Sibylle Koczian Universitaetsbibliothek, Abt. Naturwiss. D-86135 Augsburg e-mail : [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list