Create an instance of a class


#1



Replace this line with your code.


#2

class Someclass(object):
    pass

my_instance = Someclass()

print type(my_instance)    # <class '__main__.Someclass'>

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.