Effective Python Practice: Write Helper Functions instead of Complex Expressions
- Consider the following code which parses the query string and prints some values
- If you need to reuse the logic repeatedly even two or more times, then writing a helper function is the way to go.
- Refer Here for the code written
Object Oriented Programming
- self represents the current object in the method definition. These methods are referred as instance methods
class Student:
def enter_name(self, name):
pass
- Refer Here for the code written in the class
- Next Week:
- Design Patterns