Important functions in python
input
del
abs absolute value
all() result true is all valid value , false if value contains false or 0
bin() converts to binary
bool()
format()
getattr(class,"object") returns value of object of a class # also class.object
iter and next # iterators
len() finds length
list()
open("file location")
map()
divmod(N1,N2) result == (quotient,remainder)
filter()
sorted()
pow() power eg pow(4,2) == 4**2
range()
reversed()
round()
type()
zip()
vars() __init__
eval('15+10')==25 # convert string to int or float accordingly
id(variable)==place where variable is stored
return == makes output of a function
default input eg. def function(variable='something')
try: sub part of function
except: runs if try shoes error **
yield - generates a output as an object in memory
continue: return back to the next iteration skipping any statement after it
ord("alphanumeric")==ascii code
chr(ascii code)==alphanumeric
Comments
Post a Comment
For any queries or suggestions
Comment Here