Generating all strings of a given alphabet

License: Freeware
Date Added: 29 January, 2013
Category: Scripts / Others
Author: activestate.com

This script shows a way to generate a list of all strings (in this case, string=list of symbols) of a given alphabet having a specified length by using list comprehensions.


Advertisements



 

This script shows a way to generate a list of all strings (in this case, string=list of symbols) of a given alphabet having a specified length by using list comprehensions. Strings (not the 'string' type) are frequently used in computer science; for example numbers are encoded as strings of base-2 numbers (having an alphabet of {0,1}). This implementation is just a quick hack; it uses cartesian product to find the stings, so it will consume a large space of memory (m**n lists of size n, where m is the size of the alphabet, and n is the desired length).


Operating Systems:  Python, Windows, Linux, BSD, Solaris, Mac OS


Generating all strings of a given alphabet Related Downloads
 
Download Spring and Easter Collection for PostSmile 1.9

Spring and Easter Collection for PostSmile 1.9  Be creative! Decorate and animate your Easter greetings with this images and quotations collection for PostSmile! Categories include Sun, Bunny, Eggs, Spring, Easter ABC and Spring ABC, Easter and Spring Poems and Quotes.

Download Arabic School Software 1.0

Arabic School Software 1.0  Learn Arabic Fast and easy - offers interactive multimedia Arabic lessons suitable for beginners, and ideal for children.

Download Alphabet Shoot 1.0

Alphabet Shoot 1.0  Those who wonder why in the world they ever took a course in physics can derive some satisfaction from playing this game successfully; it requires just a modicum of understanding of the basic principles of physics.

Download JILetters 0.0.6

JILetters 0.0.6  This project assists children with learning the alphabet and becoming more aware of the appearance of letters. It doesn't yet address the phonics of those letters correctly, although it does associate a word with that letter.

Download RNDGen 1.2

RNDGen 1.2  True random generator for Delphi and C++ Builder

Download Metty Meta Tag Maker 1.31

Metty Meta Tag Maker 1.31  Free tool for creating HTML meta tags, which can allow your web pages to be properly indexed by search engines.

Download Profit Protector 1

Profit Protector 1  Protect your affiliate links with javascript encapsulation. Profit Protector will generate HTML pages that you can link to that will hide and protect your affiliate identification.

Download PhotoMeister 2.6

PhotoMeister 2.6  Helps you to handle, edit and publish photos from your digital camera. All functions that you need to manage your photos and to impress your family, friends or customers with your photos are included in one piece of software! Easy to use and install!

Download DSSF3 Basic 5.0.8.x

DSSF3 Basic 5.0.8.x  The free version of the advanced sound measurement software DSSF3 is now available. It consists of the signal generator, sound recorder and player, and the peak level meter.

Others Popular Downloads
 
Download mvnForum .2GA 1.0

mvnForum .2GA 1.0  mvnForum is an open source, powerful, easy to use, easy to setup bulletin board (forum) built on the Java J2EE technology (Jsp/Servlet). mvnForum is compatible with any Servlet Containers which supports Jsp 1.2 and Servlet 2.3.

Download Aardvark Topsites PHP 5.2.0

Aardvark Topsites PHP 5.2.0  Aardvark Topsites PHP has a ton of features. I'm not going to bore you with all the inane details, but here is a list of the main features. - Members ranks can be shown on their button.

Download Guestbook class 1.0

Guestbook class 1.0  This class is meant to manage a guest book storing its records either in XML files database or in a SQL database. Currently it supports only MySQL databases.

Download MOC Designs PHP News 1.1

MOC Designs PHP News 1.1  MOC Designs PHP News is a PHP-SQL powered, dynamic, news editor and displayer. Adding news on your website is done through a web-page form, saving you the time of editing your news page and then uploading the news page again.

Download Php Board Script 6.4.3

Php Board Script 6.4.3  Php Board Script allows you to create a simple discussion forum. It is made in Php, without My SQL, which on each server or Webspace is installed in well 5 minutes.

Download CMS Mini 0.2.2

CMS Mini 0.2.2  CMS Mini is a very small PHP application for manage content for small web sites. Not intended for a cooperative group of editors and rewiers: simply one editor can insert new contents, immediatly pubblished on web: "one task, one click".

Download m-phorum 0.3

m-phorum 0.3  m-phorum is a new small phorum, using PHP with one mysql database backend. Tested on php 4.3, apache 1.3.27 & mysql 3.23.52. It is simple and fast.

Download PDF::Reader 1.0

PDF::Reader 1.0  The PDF::Reader library implements a PDF parser conforming as much as possible to the PDF specification from Adobe.

Download lilURL 0.1.1

lilURL 0.1.1  lilURL is a simple PHP/MySQL script for generating shorter URLs. It's similar to TinyURL, Shorl, MakeAShorterLink, etc, but you can run it on your own server ((which is pretty much the same thing as TightURL).

Submit Reviews for Generating all strings of a given alphabet
- required fields