Category: Python
-
Magic method or Dunder method in Python
__str__ function : The __str__ method is a special method in Python classes that is used to define a string representation of an object. The method should return a string that provides a human-readable representation of the object’s state. This string is used when the object is printed, or when the built-in str() function is called on the object.…
-
Variable in Python
Overview: In this blog discuss about What is a variable in Python?,Rules for Python variables,Python Assign Values to Multiple Variables,Assign values at Single or Double Quotes,Get the Type ,Casting,Object Reference in Python. What is a variable in Python? A Python variable is a reserved memory location to store values (ie.,Variable is containers that store values)…
-
Python Introduction
Overview: In this blog discuss about what is python ? and its uses. Advantage of python and then it’s keyword. What is Python? Python is a high-level, general-purpose, interpreted object-oriented programming language. Similar to PERL, Python is a programming language popular among experienced C++ and Java programmers. Python is a computer programming language often used…