ram <[EMAIL PROTECTED]> wrote:
> Here's a little issue I run into more than I like: I often need to
> unpack a sequence that may be too short or too long into a fixed-size
> set of items:
>
> a, b, c = seq # when seq = (1, 2, 3, 4, ...) or seq = (1, 2)
>
> What I usually do is something lik
On Dec 18, 12:49 pm, ram <[EMAIL PROTECTED]> wrote:
> Here's a little issue I run into more than I like: I often need to
> unpack a sequence that may be too short or too long into a fixed-size
> set of items:
>
> a, b, c = seq # when seq = (1, 2, 3, 4, ...) or seq = (1, 2)
>
> What I usually d
Here's a little issue I run into more than I like: I often need to
unpack a sequence that may be too short or too long into a fixed-size
set of items:
a, b, c = seq # when seq = (1, 2, 3, 4, ...) or seq = (1, 2)
What I usually do is something like this:
a, b, c = (list(seq) + [None, No