The Artima Developer Community
Sponsored Link

Python Buzz Forum
Python splitting up a sequence

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
Python splitting up a sequence Posted: Apr 25, 2005 11:41 AM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Guyon Morée.
Original Post: Python splitting up a sequence
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
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), ...

Read: Python splitting up a sequence

Topic: Racks are us Previous Topic   Next Topic Topic: matplotlib

Sponsored Links



Google
  Web Artima.com   

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