I want to create a list that outputs something like this:
- string1
- string2
- string3
- string4
but the number at the beginning to be a number that is a variable that incrementally increases by one in the loop.
I want to create a list that outputs something like this:
but the number at the beginning to be a number that is a variable that incrementally increases by one in the loop.
Try something like this:
for i, s in enumerate( ("string1", "string2", "string3"), start = 1 ):
print "{}. {}".format( i, s )