Wondering if there is a better way to generate string of numbers with
a length of 5 which also can have a 0 in the front of the number.
<pre>
random_number = random.sample([0,1,2,3,4,5,6,7 ,8,9], 5) # choose 5
elements
code = 'this is a string' + str(random_numb er[0]) +
str(random_numb er[1]) + str(random_numb er[2]) + str(random_numb er[3])
+ str(random_numb er[4])
</pre>
a length of 5 which also can have a 0 in the front of the number.
<pre>
random_number = random.sample([0,1,2,3,4,5,6,7 ,8,9], 5) # choose 5
elements
code = 'this is a string' + str(random_numb er[0]) +
str(random_numb er[1]) + str(random_numb er[2]) + str(random_numb er[3])
+ str(random_numb er[4])
</pre>
Comment