Skip to content

Instantly share code, notes, and snippets.

@raeq
Created July 18, 2020 22:25
Show Gist options
  • Save raeq/b448a7fb69c37e852d489c3ed8e858d1 to your computer and use it in GitHub Desktop.
Save raeq/b448a7fb69c37e852d489c3ed8e858d1 to your computer and use it in GitHub Desktop.
List to csv
def from_list(line: list = []) -> str:
ret = ", ".join(e for e in line)
return ret
assert from_list(["a", "b", "c"]) == "a, b, c"
assert from_list(["one", "two", "three"]) == "one, two, three"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment