str and repr

    0

    3

    Knight Qu

    The str() function will return the string representation of the object, and the repr() function will return a string representation of the object as it would appear to a human.

    Shortcut: strAndrepr

    
    def __str__(self):
      pass
    
    def __repr__(self):
      pass
    
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.