Hi all, I found this function that converts a integer into a 8 bit binary string. Would somebody care to explain what is happening in this process? def intToBin(self, x, count=8): """ Parameters: `x`: integer Returns a 8 bit binary string of x """ return "".join(map(lambda y:str((x>>y)&1), range(count-1, -1, -1)))
Thanks Johan -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.441 / Virus Database: 268.18.3/694 - Release Date: 2007/02/20 01:44 PM
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor