$.02,
e.
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> Of Alan Gauld
> Sent: 22 February 2007 11:46 AM
> To: tutor@python.org
> Subject: Re: [Tutor] Explanation of this lambda
>
>
> "Johan Geldenhuys" <[EMAIL
t: Re: [Tutor] Explanation of this lambda
"Johan Geldenhuys" <[EMAIL PROTECTED]> wrote
> Would somebody care to explain what is happening in this process?
>
> def intToBin(self, x, count=8):
>return "".join(map(lambda y:str((x>>y)&1), range(c
"Johan Geldenhuys" <[EMAIL PROTECTED]> wrote
> Would somebody care to explain what is happening in this process?
>
> def intToBin(self, x, count=8):
>return "".join(map(lambda y:str((x>>y)&1),
> range(count-1, -1, -1)))
"".join() turns a list into a string
map() returns a list where e
Bob Gailer wrote:
I just noticed missing ) in the last 2 statements. Fixed below.
Johan Geldenhuys wrote:
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?
Johan Geldenhuys wrote:
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