Questions tagged as 'diccionarios'

1
answer

Relate two C # dictionaries

I have two text files with the following data (separated by tabs): CLIENT ID_CLIENTE CLIENTE MERCADO 1198 CTA G 1285 FGF B 1112 EJESA B 1131 ESPERANZA F 1150 NORP...
asked by 04.04.2018 / 01:08
5
answers

How to check if a key is in a javascript dictionary

I have the following dictionary: diccionario = {1: "uno", 2: "dos", 3: "tres"} I would like to see if it contains a certain key, for example, 2. How can I know? And by the way ... I would also like to know how to check if a value is in t...
asked by 25.04.2018 / 17:33
1
answer

Find values from a dictionary in a JSON and add them

I have 2 txt files. 1 is a dictionary with term, value and I have another file with a json that simulates a list of tweets. I have to look up the terms of the dictionary in the json and if it finds the term, add the value to a variable that I...
asked by 23.02.2018 / 13:48
2
answers

'key' in dict vs. dict.get ('key')

What is the main difference between: >>> dic = {} >>> existe = dic['key'] if 'key' in dic else None >>> existe None Y: >>> dic = {} >>> existe = dic.get('key', None) >>> existe None...
asked by 05.04.2018 / 18:05
1
answer

list dictionary elements and a list in a line

Hi, I'm doing a test with lists and dictionaries, I got to a point where I had something like that. datos = {'key1':'a','key2':'b','key3':'c'} dic = ["alfa","beta","gama"] My intention is to print a,alfa b,beta c,gama I tried it with a...
asked by 30.06.2017 / 08:20
1
answer

Add new element to Python dictionary

I want to add new elements to a dictionary in a for cycle, but it is replaced. I am adding it this way: for j in range(len(Repetidos)): historias[m[j]]=Repetidos[j] Is it okay how I do it? since at the end I only throw an ele...
asked by 13.07.2017 / 00:47
1
answer

How can I create an input dictionary with a forEach in Javascript?

What I want to do is create a dictionary in javascript and then use it in python. I have some dynamic inputs that have different attributes that I would like to put in a dictionary how can I do this? I would like an output more or less if:...
asked by 23.08.2018 / 21:54
2
answers

Help with exercise in JS creation and use of functions

I need help with the following exercise: Develop a function that punctuates a hand of cards, which has as parameter an array of letters, each one represented by a dictionary with suit and value. When scoring, the cards add their value except...
asked by 07.08.2018 / 01:05
1
answer

Select from a dictionary the list with the least elements

I have a concurrentDictionary in which it contains a list. I would like to know how I can get the Key from the list with fewer elements. ConcurrentDictionary<string, List<object>> _listInfo = null; For example, imagine th...
asked by 14.09.2017 / 16:00
2
answers

Read dictionary key with Selenium Python

I have the following code. The program is complete, only I need a small adjustment. As you can see, I read a dictionary and I'm entering the keys in different places on the selenium website. Now, here the problem appears, I need you to just call...
asked by 19.10.2017 / 16:59