PythonPlacement Classroomnotes 28/Feb/2022

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):
  • Refer Here for the code written in the class
  • Next Week:
    • Design Patterns

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About continuous learner

devops & cloud enthusiastic learner