以下Python代码中,哪个选项可以正确地创建一个类和其实例?( )
class MyClass(): pass my_instance = MyClass('ok')
class MyClass(): def __init__(self): print('hello') my_instance = MyClass()
class MyClass(): x = 10 my_instance = MyClass(x)
def MyClass(): print("This is a method") my_instance = MyClass()