[Tutor] All possible 16 character alphanumeric strings?

Steven D'Aprano steve at pearwood.info
Sun Sep 16 05:21:15 CEST 2012

On 16/09/12 08:50, Scurvy Scott wrote:
> Hello again python tutor list.
> I have what I see as a somewhat complicated problem which I have no idea
> where to begin. I'm hoping you fine folks can help me.
> I'm trying to generate a list of every possible 16 character string
> containing only 2-7 and a-z lowercase.
> I'm not looking for a handout- just a point in the right direction.

Look at itertools.product for a way to generate such strings one at a time,
without needing to store them all in a list.


More information about the Tutor mailing list