In Python, everything is an object. They have identities, types, and values, but also inherent properties and methods. For example, you can determine the index of a given substring using a string object's index method: import string greeting = "Hello World! It's nice to meet you!" location = greeting.index("nice") print location You can create your own objects with the class statement. User-defined classes can have class variables and class methods, which govern all instances of the class. Each instance of a class can, in turn, have its own instance variables that don't apply to other instances. |