+ 1
Can somebody tell me what is happening here
Is the output a real error or the 'coded error' https://code.sololearn.com/cqULnvjvsOky/?ref=app
1 Antwort
+ 5
See how you get it working:
try:
name = "123"
name2 += 1 # name2 is not defined!!!
#raise NameError("Invalid name!")
except Exception as e:
print (name)
print(e)
#output is:
123
name 'name2' is not defined