Skip to content

Instantly share code, notes, and snippets.

@bopjiang
Last active November 27, 2023 03:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bopjiang/a554a010a674b1ea842ec87e11dff18d to your computer and use it in GitHub Desktop.
Save bopjiang/a554a010a674b1ea842ec87e11dff18d to your computer and use it in GitHub Desktop.
python_lib
def write_list_to_file(filename, my_list):
with open(filename, 'w') as file:
file.writelines(str(item) + '\n' for item in my_list)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment