I’m new with Python so I tried some lines of code:
class loesung02(object):
html = ""
file1 = ""
def __init__(self, html, file1):
self.html = html
self.file1 = file1
print html + file1
i call it like that:
loesung02("aaaaaaaaaaaa", "bbbbbbbbbbb")
using the Python Shell
but I always get the ErrorMessage, so whats wrong?
What error message did you get? Your code run perfectly ok in my computer. I’m using python 2.7.1. Did you write that in a file and then run it or you write that in interpreter? If it is the latter, reinitialize or re-run your interpreter as there might be other variables that interfere with your code.