Showing posts with label python example program. Show all posts
Showing posts with label python example program. Show all posts

Saturday, November 14, 2020

, ,

Example program for setattr() function in Python

setattr() function in Python use to set the value of an attribute.setattr() function in Python Syntax : - setattr(object, name, value) If you want to read the object then use the getattr() function.Parameters For setattr():- It takes three parameters and these are:-Object : - the object...

Monday, November 2, 2020

, ,

Example Program for vars() function in python - Python Example Program

 vars() function in python return the dictionary attribute of an object.Example Program for vars() function in python vars() can just take one object that can be module, class, instance, or any object which  having the __dict__ attribute in python program.If the any object passed to vars()...

Sunday, November 1, 2020

, ,

Example program for Any function in python - Python Example Program

 Any function in python programming number of iterable is used and return the true if any element of any iterable is true or return the false. Any function in python Syntax of any function in python any(iterable) Any function in python take iterable (string, dictionary etc.) as a Parameters.Return...

Friday, October 30, 2020

,

Example program for slicing in python - python __slice__

 slice() function in python is used to sliced a given sequence or given object There are three parameters the first one is an starting point which is optional.second parameter for slice function tells about the ending point.Third one will tell the increment between each index.Syntax:- ...