13 lines
284 B
Python
13 lines
284 B
Python
|
|
def makeList(separator):
|
||
|
|
counter = 1
|
||
|
|
|
||
|
|
def makeItem(item):
|
||
|
|
nonlocal counter
|
||
|
|
result = str(counter) + separator + item + "\n"
|
||
|
|
counter += 1
|
||
|
|
return result
|
||
|
|
|
||
|
|
return makeItem("first") + makeItem("second") + makeItem("third")
|
||
|
|
|
||
|
|
print(makeList(". "))
|