Hello to all!How can i make a list from all the small letters of the alphabet without writing every one?Is there an operator/function that does that,something like .I've tried in many ways but i'm new in Python and if there is that operator i haven't discover it yet.My appreciation!
coder_gus 0 Newbie Poster
Recommended Answers
Jump to PostThis will do it ...
print "Fill a string with a - z:" alphaStr = "" # letters a to z are ASCII code 97 to 122 for k in range(97, 123): alphaStr += chr(k) print alphaStr # if you don't have an ASCII table handy let …
Jump to PostThanks mawe, welcome to this tiny Python corner. So a simple ...
import string alphaStr = string.lowercase print alphaStr
... would have done it. I guess it pays to run ...
help('string')
Thanks again!
All 5 Replies
vegaseat 1,735 DaniWeb's Hypocrite Team Colleague
mawe 6 Junior Poster
vegaseat 1,735 DaniWeb's Hypocrite Team Colleague
mawe 6 Junior Poster
coder_gus 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.