Skip to content
Snippets Groups Projects
Commit acf7b939 authored by Samuel Mondal's avatar Samuel Mondal
Browse files

Docstring addition

parent 5d34c21b
No related branches found
No related tags found
1 merge request!18Docstring addition
def list_to_file(to_write_to_file,filename):
def list_to_file(
to_write_to_file: str,
filename: str,
) -> None:
"""Creates a file from a list that is input to the function.
Args:
to_write_to_file: The list that you want to write to a file.
filename: The name you want the output file to have (also include the extension of the file while calling the function).
Returns:
Nothing, since it outputs a file directly to the working directory
"""
file = open(filename,'a')
for item in to_write_to_file:
file.write(item)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment