| 1 | initial version |
You can count the number of occurrences of the object [1,2] in the list X as follows:
sage: X.count([1,2])
2
And you can have the length of X as follows:
sage: len(X)
5
I am pretty sure you will be able to deduce the frequency from those two informations ;)
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.