The Artima Developer Community
Sponsored Link

Python Buzz Forum
1e Python splitting up a sequence 12

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Guyon Morée

Posts: 66
Nickname: gumuz
Registered: Apr, 2005

Guyon Morée is a professional powerbuilder programmer fallen in love with python
1e Python splitting up a sequence 12 Posted: May 18, 2005 8:23 AM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Guyon Morée.
Original Post: 1e Python splitting up a sequence 12
Feed Title: gumuz' devlog
Feed URL: http://gumuz.looze.net/wordpress/wp-rss2.php
Feed Description: 'till dev do us part
Latest Python Buzz Posts
Latest Python Buzz Posts by Guyon Morée
Latest Posts From gumuz' devlog

Advertisement
11d Occasionally I want to chop up a sequence, so that a new sequence is created of the same items, but as pieces of x. That's why I have the following tiny utility function. It could be a one-liner :) def splitseq(seq,size): return [seq[i:i+size] for i in range(0, len(seq), ... 2c

Read: 1e Python splitting up a sequence 12

Topic: Wiki Gonzalez Previous Topic   Next Topic Topic: PyCon Slides

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use