union in Python
jorgencederberg at hotmail.com
Wed Aug 13 08:29:14 CEST 2003
Wiebke Pätzold wrote:
you did what I asked, but you forgot to read to whole message I wrote to
> This is the error-traceback that is print whenmy program failed:
>>>> Themenbereiche Nachname
> Traceback (most recent call last):
> line 310, in RunScript
> exec codeObject in __main__.__dict__
> line 46, in ?
> print feld_th, feld_na, union1(feld_th, feld_na)
> NameError: name 'union1' is not defined
The following is taken from my previous message to you:
> Where are the functions union1 and union2 defined and why do you want to find the union between two strings, it doesn't make sense. On the other hand, if feld_th and feld_na where two lists it would make sense.
And this is exactly what caused the error. The last line of your
traceback states the problem: > NameError: name 'union1' is not defined
You should really read the tracebacks carefully, they tell what went
wrong and where it went wrong.
You probably made the functions somewhere else, but I still don't see
the point in taking the union of two strings.
Do you care to explain how the functions work or how you intend to get
them working or do just want a solution to your assigment?
Ps.. You should really do your self a favour and download the
Read the tutorial carefully and try to do some the examples in it.
More information about the Python-list