Ved Prakash Introduction to Objects and Types in Python | codinggiri GuidePedia

0

Welcome Guys to this new Post. Today we will learn about Data/Object Types in Python Programming Language.
Rule You Must Follow:

Everything is an Object.

From Python Docs , The Python Data-Model -Reference has a very clear and good definition about Objects in Python

Objects are Python's abstraction fro data. All data in a Python Program is represented by object or by relation between objects.
Every Object had an identity, a type and a value.In Short Everything in Python is an Object.like [42,ved,India,White house evrything is an object]

TYPES

An object's type determines the operations that the object support and also defines the passable value for object of that type
 that means every object in Python has a type . You can find/discover the type(built-in-function)with the flowing method just write that code and save that with desirable name with a .py extension , run it and see the result. For better understanding see the screenshot in the last of this post.
a = "My name is ved"
print (type(a))
b = 42
print (type(b))
c  = 23.5
print(type(c))





















If you are facing any problem while learning python please email me or comment below. I will help you out ASAP.  In next post we will find out more on object/data types. see you , Happy Codding :)

Post a Comment

 
Top