πŸ“Š Django
Q. Which function is used in Django models to define a string representation?
  • (A) __print__
  • (B) __str__
  • (C) __name__
  • (D) __display__
πŸ’¬ Discuss
βœ… Correct Answer: (B) __str__

Explanation: The `__str__` method in models defines the string representation of an object.

Explanation by: Mr. Dubey
The `__str__` method in models defines the string representation of an object.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
58
Total Visits
πŸ“½οΈ
11 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
90%
Success Rate