my net house

WAHEGURU….!

Learn Python and OOPS

OOPS…..!!
Ok first of all when we think about OOPS we think about class.
yes Class
1.Create Class

class Honey:
name=”Arshpreet”;
#Object for class
meandme=Honey();
#Access variable of class using object
print meandme.name;

#One more object
myandmy = Honey();
#assign new value to variable using object

myandmy.name = “yackity”;
print myandmy.name;
[]
For using function just use object with function name. like meandme.functionname(). so I think we can also use other stuff too in Python class. That’s All

python sikhni hai

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: