Skip to content

Instantly share code, notes, and snippets.

@RadoRado
Created February 16, 2015 14:48
Show Gist options
  • Select an option

  • Save RadoRado/45d09d90f99d49f2ebb0 to your computer and use it in GitHub Desktop.

Select an option

Save RadoRado/45d09d90f99d49f2ebb0 to your computer and use it in GitHub Desktop.
names = ["Ivan", "Asen", "Vtori"]
result = ""
index = 0
last = len(names) - 1
for name in names:
if index == last:
result = result + name
else:
result = result + name + ", "
index = index + 1
print(result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment