24 lines
		
	
	
		
			651 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			651 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| ---
 | |
| title: Inheritance
 | |
| ---
 | |
| ## Inheritance
 | |
| 
 | |
| Because Python is an opject oriented programing language, classes created in Python are able to inherit attributes and methods from other classes.  For example:
 | |
| 
 | |
| ```python
 | |
| class ParentClass():
 | |
|     pass
 | |
|     
 | |
| class ChildClass(ParentClass):
 | |
|     pass
 | |
|     
 | |
| ````
 | |
| In the very basic example, the `ChildClass` class will inherit from `ParentClass` and use code defined under that class.  
 | |
| 
 | |
| Python is also able to support multiple inheritance, so child classes can inherit from multiple classes. 
 | |
| 
 | |
| #### More Information:
 | |
| <!-- Please add any articles you think might be helpful to read before writing the article -->
 | |
| 
 | |
| 
 |