<commit_before>'''
Created on Jul 1, 2014

@author: viejoemer
'''
############################################################
#HowTo create and set a value in a dict in python?

#Creating a dict with data

d = {
     "red":100,
     "yellow":200,
     "blue" : 300
     }

print(d)

#Set a value
d["red"] = 111

print(d)

#Create a key and set a value

d["black"] = 400

print(d)

print(d)<commit_msg>HowTo create and set a value in a dict in python?<commit_after>'''
Created on Jul 2, 2014

@author: viejoemer

HowTo create and set a value in a dict in python?

¿Cómo crear e insertar un valor en un diccionario en Python?

'''

#Creating a dict with data
d = {
     "red":100,
     "yellow":200,
     "blue" : 300
     }
print(d)

#Set a value
d["red"] = 111
print(d)

#Create a key and set a value
d["black"] = 400
print(d)
{'fraction_non_alphanumeric': 0.19105199516324062, 'fraction_numerical': 0.04836759371221282, 'mean_word_length': 3.4756756756756757, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, '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': '6092713', 'n_tokens_mistral': 339, 'n_tokens_neox': 293, 'n_words': 113}