Python - Constructors and Object Initialization
Identify the error in this code:
class D:
def __init__(self, val):
self.val = val
def show():
print(self.val)
d = D(5)
d.show()