<jupyter_start><jupyter_text>Often times when working with data, you will use a dictionary just so you can use key names to make reading the code and accessing the data easier to understand. Python has another container called a `namedtuple` that is a tuple, but has names for each position of the tuple. You create one by passing a name for the tuple type and a list of field names.For example, `Cookie = namedtuple("Cookie", ['name', 'quantity'])` will create a container, and you can create new ones of the type using `Cookie('chocolate chip', 1)` where you can access the name using the `name` attribute, and then get the `quantity` using the quantity attribute.<jupyter_code>from collections import namedtuple
nt = namedtuple('carro', ['marca', 'cor'])

# Tipo: 'carro'
# Atributos: 'marca' e 'cor'
lista = []
lista.append(nt('BMW','azul'))
print(lista)
lista.append(nt('Honda','vermelho'))
print(lista)
for i in lista:
  print(i.marca, i.cor)<jupyter_output>BMW azul
Honda vermelho
{'fraction_non_alphanumeric': 0.10233029381965553, 'fraction_numerical': 0.0010131712259371835, 'mean_word_length': 5.5, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '508717', 'license': 'MIT', 'n_tokens_mistral': 294, 'n_tokens_neox': 297, 'n_words': 135, 'path': 'Notebooks/NamedTuple.ipynb', 'repo_name': 'RolandJunior/Transpose_e_List_Comprehension', 'size': '987'}