Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
Inventory Manager For Dynamics CRM 4.0
Dockit Migrator for SharePoint 11.8.6905
Australia Post Shipping For Magento 2 1.0.0
StarTrack Shipping For Magento 2 2.0.0
Mydala script 1.3
dotConnect for FreshBooks 1.8
Odoo Kingfisher Theme 1.0
Bitcoin Mining Software - Bitcoin Mining Script 1.0.2
Excel Add-in for Magento 1.7
Excel Add-in for MailChimp 1.7
Devart Excel Add-in for QuickBooks 1.7
Excel Add-in for PostgreSQL 1.7
Devart Excel Add-in for MySQL 1.7
Devart Excel Add-in for NetSuite 1.7
Excel Add-in for Salesforce 1.7
Top Code
ATN Site Builder 3.0
ATN Resume Finder 2.0
PHP Review Script 1.0
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
SecureBridge 8.0
dotConnect for SQLite 5.9
Database Workbench Pro 5.6.10.0
Excel Add-in for PostgreSQL 1.1
EntityDAC 1.6
Excel Add-in for Salesforce 1.1
Excel Add-in for MailChimp 1.1
Aglowsoft SQL Query Tools 8.2
Classified Ad Lister 1.0
Solid File System OS edition 5.1
Top Rated
phpEnter 5.1.
Single Leg MLM 1.2.1
Azizi search engine script PHP 4.1.10
Paste phpSoftPro 1.4.1
Extreme Injector 3.7
Deals and Discounts Website Script 1.0.2
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
flatten sequences 
File ID: 65270






flatten sequences 
Download flatten sequences http://code.activestate.com/recipes/576620-changedirectory-context-manager/?in=lang-pythonReport Error Link
License: Freeware
Downloads: 3
Submit Rating:
flatten sequences  Description
Description: A simple method to flatten a sequence (list, tuple...)

License: Freeware

Related: flatten, List

O/S:Windows

Downloads: 3



More Similar Code

Flatten a nested array/tuple



Extremely fast, non-recursive, depth limited flatten with powerful control over which subtrees are to be expanded. If this is what you need then look no further.



I have written Flatten a few dozen times, and also searched the interwebs - I don't feel good about a heavily recursive function for Python, and some of the "type-sniffing" I saw in some codes seemed fishy - so I coded up this version....



Interleaving can be thought of as two-dimensional iteration over a sequence of sequences, pulling the ith element from all n seqeuences before moving on to the ith + 1 element. Interleave does not truncate to the shortest list unlike...



Classic / frequently asked, 'How to flatten a list, regardless the nesting.'



This is a stab at converting a transcript generated by the Unix script command that uses ANSI escape sequences, used to colour the terminal, to HTML.



Python regular expression are very powerful and efficient and they can be applied to the recognition of different types of sequences. This recipe shows how to match sequences of generic symbol set with the power of regular expression. The code...



Creates inclusive regular sequences or fully closed ranges which differs from the half-open ranges of Python. Also accepts floating point arguments.



Python tuple unpacking works only for fixed length sequences, that is one cannot write something like:
for (x,y,z=0,*rest) in [(1,2,3), (4,5), (6,7,8,9,10)]: print x,y,z,rest

This recipe returns a pad function that implements this...

User Review for flatten sequences
- required fields
     

Please enter text on the image