I need to generate a string with n characters in Python. Is there a one line answer to achieve this with the existing Python library? For instance, I need a string of 10 letters:

string_val="abcdefghij"

6 Answers
6

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *