You can read the complete list in the Python documentation. You can use this Interactive Shell to try the functions online.
enumerate
This function is helpful when you would use an approach like for(x=0;x<len(a);x++) in some languages:
animals = ["cow","pelican","giraffe"]
for x,animal in enumerate(animals):
print “Animal no. %s: %s” % (x,animal)
This will give this output:
Animal no. 0: cow
Animal no. 1: pelican
Animal no. 2: giraffe
filter
This function lets you select only elements that fulfill a certain condition from a list:
filter(lambda x: x > 4,range(11))
#returns [5, 6, 7, 8, 9, 10]
You can use any function that returns True or False instead of “lambda x: x>4″.
map
This function takes a list and generates a new element for each list element:
map(lambda x: pow(x,2),range(11))
#returns [0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
dict
This function produces a dictionary out of the supplied arguments. For example if you supply a list of tuples:
dict([("positive","good"),("negative","bad")])
#returns {‘positive’: ‘good’, ‘negative’: ‘bad’}dict((“square of %s” % h,pow(h,2)) for h in range(4,8))
#returns {‘square of 7′: 49, ‘square of 6′: 36, ‘square of 5′: 25, ‘square of 4′: 16}
More info in the docs.
chr, ord, hex
These functions are more trivial:
chr returns an ASCII string for a character
ord returns an ASCII code for a character (it also works for Unicode)
unichr is the Unicode version of chr
hex Gives a hexadecimal string representation of a number
ord(‘a’) #return 97
hex(97) #returns ’0×61′
chr(0×61) #returns ‘a’
Image may be NSFW.
Clik here to view.

Clik here to view.
