Re: [Tutor] Problems padding a string with 0's while deconcatonating

2005-12-05 Thread John Fouhy
On 06/12/05, Josh Yagy <[EMAIL PROTECTED]> wrote: > Wow, that code is much more compact, thanks for the help! But as far as the > original > question goes, I think I worded my problem wrong. The output you got with > your binary string > is almost what I Want, but not quite. I need each subset of

Re: [Tutor] Problems padding a string with 0's while deconcatonating

2005-12-05 Thread Ismael Garrido
Josh Yagy wrote: >Wow, that code is much more compact, thanks for the help! But as far as the >original question goes, I think I worded my problem wrong. The output you got >with your binary string is almost what I Want, but not quite. I need each >subset of binary strings to be n bits long (in

Re: [Tutor] Problems padding a string with 0's while deconcatonating

2005-12-05 Thread Josh Yagy
s are moved back two places to fill up the last subset, and the extra space is filled with 0's in the first subset. Thanks again for the help -----Original Message----- From: Kent Johnson <[EMAIL PROTECTED]> Date: Mon, 05 Dec 2005 13:05:46 -0500 Subject: Re: [Tutor] Problems

Re: [Tutor] Problems padding a string with 0's while deconcatonating

2005-12-05 Thread Kent Johnson
Josh Yagy wrote: >I have the following code: > >def binaryString(b, n): > s=[] > j=0 > while j < len(b): > temp = b[j:j+n] > s = s + [ temp ] > j = j + n > return s > >which works for all intents and purposes, but I can't figure out

[Tutor] Problems padding a string with 0's while deconcatonating

2005-12-04 Thread Josh Yagy
Hello everyone, this is my first time using the tutor e-mail, so if I mess up any common format or something just let me know :). Alright, for a little background, I'm in the process of writing a merkle-hellman cryptosystem for my CS15 class. I'm doing fine till I get to the decatonation of the