PYTHON BUILD-IN FUNCTIONS

LEN() Len function take an iterable object and returns the numbers of items in an object. Example: >>items = [1,2,3,4] >>print(len(items)) Output :4 ZIP() Zip function can take nth iterable objects and return a zip object which is an iterator of tuples. Example: >>ids=[1,2,3] >>names=[‘a’,’b’,’c’] zipobj=zip(ids,names) print(list(z)) Output: [(1,’a’),(2,’b’)'(3,’c’)] ORD() Ord function return a number … Continue reading PYTHON BUILD-IN FUNCTIONS

BUILT-IN TYPES IN PYTHON

Here is the list of most commonly used built-in types that Python supports: Immutable Built-in Datatypes NUMBERS : Python supports integers, floats and complex numbers. An integer is a number without decimal point for example 5, 6, 10 etc. A float is a number with decimal point for example 6.7, 6.0, 10.99 etc. A complex number has a real and imaginary … Continue reading BUILT-IN TYPES IN PYTHON

Design a site like this with WordPress.com
Get started