<commit_before>---
layout: post
author: alexharding
published: true
---






#My Code

What follows is my python code which allows the user to add their own list of names and choose a file name to write out to.

```Python

def add_names(list_of_names, file):
  names_file = open(file, 'a')
  for name in list_of_names:
    print >> names_file, name
  names_file.close()


new_names = input('Type a list of names. ')
file_name = input('Type a file name ')+'.txt'
add_names(new_names,file_name)
print 'This program created '+str(file_name)+' in your home directory.'
```<commit_msg>same as before, fixing jekyl<commit_after>---
layout: post
author: alexharding
published: true
---






#My Code

What follows is my python code which allows the user to add their own list of names and choose a file name to write out to.

```

def add_names(list_of_names, file):
  names_file = open(file, 'a')
  for name in list_of_names:
    print >> names_file, name
  names_file.close()


new_names = input('Type a list of names. ')
file_name = input('Type a file name ')+'.txt'
add_names(new_names,file_name)
print 'This program created '+str(file_name)+' in your home directory.'

```
{'fraction_non_alphanumeric': 0.11006825938566553, 'fraction_numerical': 0.0, 'mean_word_length': 4.1902654867256635, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6951729', 'n_tokens_mistral': 397, 'n_tokens_neox': 379, 'n_words': 147}