Questions tagged as 'diccionarios'

1
answer

Change strings with reference to dictionaries

To put my question correctly, I will put some "contextual" code. Unfortunately, I had to go to see the solutions of a couple of exercises because it was not clear to me what had to be done and how the code works. I hope you can guide me. First o...
asked by 16.09.2017 / 10:44
1
answer

Accesses using Key Dictionaries Python

I want to place some function in my code that allows me to enter the dictionary key outside the code. I mean to run the program and through the terminal I asked what key of the dictionary I want to place. To express myself better here is part...
asked by 09.10.2017 / 04:26
1
answer

Help with exercise in JS

Good afternoon I hope someone can help me, I had to do an exercise in which I stored the cards of a deck, I separated them in black letters and red cards, then I took out the red and even cards and I printed the last card, all of According to th...
asked by 04.08.2018 / 22:16
5
answers

Arrays and Dictionaries in JavaScript

I am doing an introductory course to the programming in which we are using JavaScript with the browser console and I was clear about the topic of the arrays but that of the dictionaries for nothing. For example, this line of code I do not und...
asked by 31.07.2018 / 22:17
2
answers

Incorrect operation of a character counter within strings in Python

Suppose I have the following sentence: oracion = 'Mi perro bonito come todas las noches' And I want to create a function that tells the occurrence of each character within it. To that end, we import string and create an alphabet that is our...
asked by 12.10.2017 / 07:21
1
answer

When filling in a python dictionary in for me, repeat the last value in the other items

I have a dictionary that I want to fill with two lists, one that has the key and another that has the values, when it is with the for to save each item it is removed in order and saves them, but at the time of printing the dictionary I see that...
asked by 11.10.2017 / 18:58
2
answers

Context processor for templates | ValueError - Django

Very good friends, I have my custom context processor, so that it can be used in all the django project templates in the form of a variable: {{ u_model }} This is my context processor: proccesors.py from django.contrib.auth.decorator...
asked by 17.09.2018 / 22:11
1
answer

Does Vala have associative arrays?

I'm trying to find a way to create associative arrays, such as dictionaries in Python:    dictionary = {"key1": value1, "key2": value2} How can I implement it in Vala? or if there is no other solution that would be more practical. Than...
asked by 25.03.2018 / 01:34
2
answers

openpyxl import ranges and convert into dictionary

On an Excel sheet I have a table with two columns (Date and Value). The date has the format dd/mm/yy . With the script I show below I import the data contained in the A63:B80 range of said Excel sheet. #!/usr/bin/env python # -*-...
asked by 18.09.2017 / 20:25
2
answers

Dictionary encoded Python

I need to convert A to B. I work with Python 2.7 A: payload = {"trafficChannel":{"name":"tuviaasa","status":0,"billedEvent":"ai","env":"desktop","dealType":"fixed_price","optimizeAllAdSources":"false","optimizeFor":"ecpm","publisher":"5a031...
asked by 08.11.2017 / 21:21