Path: csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.034 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'subject:Python': 0.05; 'subject:How': 0.09; 'subject:using': 0.09; 'def': 0.13; 'subject:array': 0.16; 'tuple,': 0.16; 'wrote:': 0.16; '2015': 0.20; 'sorry,': 0.22; 'header:In-Reply-To:1': 0.24; 'message- id:@mail.gmail.com': 0.27; 'tue,': 0.34; 'received:google.com': 0.35; 'should': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'to:addr:python.org': 0.40; '20,': 0.66; 'here': 0.66; 'dict.': 0.84; 'to:name:python': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=LiC3SBBW3ZcSc65K2FP9SZY0gjr1Sdg0NnazyCL/Pzs=; b=wwHIaetZa2SdLZl04dX5Es1YDTz5KqHOnyL1iDfbTjZUoiYUOwdPSefj+qpjlNIVd9 mL+60nBqOzrfi3EDud0T8xS9X9x8kyGTK+MD7P0PlHa5Zyv4GjaOvHf5HDCI/UMG8z2b kXDR5kqNewYhIrbkWa3bLV6BayuwKh4uAkOYQax7ArgpOUGSSYzC4T9QWJn7DrHpc+mk YHWnCj6KVFMzOB8xGl0//B221iNulHBKqet86DGjn6T2Uic6qaPFrdP82JrZFBlCmqQi o8MJ+ypfH6o1C1lJwiZe82+WqzpJ2bj37xlOGam1MFFwM6hIRm7Q7/kXM0QKkbwUgM29 M6qQ== X-Received: by 10.50.43.170 with SMTP id x10mr26018993igl.68.1445369351753; Tue, 20 Oct 2015 12:29:11 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1468455.P0rGZF1LBf@PointedEars.de> From: Ian Kelly Date: Tue, 20 Oct 2015 13:28:29 -0600 Subject: Re: How to rearrange array using Python? To: Python Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 5 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1445369355 news.xs4all.nl 23730 [2001:888:2000:d::a6]:51901 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:97843 On Tue, Oct 20, 2015 at 1:26 PM, Ian Kelly wrote: > def room_size_constraint(*v): > counter = Counter(v.values()) Sorry, this should just be Counter(v), since v here is a tuple, not a dict.