словари

Working with Dictionary in conjunction with GameObject

For my game of the "get out of the room" type, I want to create hints that appear when you click on the button with a questio ... more Dictionaries with the name of the variable and the name of the script itself (the keyword will be the same in all cases)

Python pull variable values from the dictionary

{"status":"success","result":[ {"picture":"data:image\/png;base64,","name":"\u0420\u0430\u0437\u0431\u0430\u043d","username": ... , end=" ") print("username{}:".format(index), i["username"]) index += 1 time.sleep(1000)

Entering dictionary data from the keyboard

Please tell me how to set the dictionary from the keyboard (via input)? For example, my dictionary should store dates and events. can I use this code? That is, I enter the year and the corresponding event in the history.

Dictionary slices in Python

Is it possible to somehow take dictionary slices in python? There is a very large dictionary, from which I want to take, say, ... appears, as I understand it, due to the fact that the dictionary elements are taken by the key. How can I solve this problem?

How do I delete duplicates in an array with Python dictionaries?

It is necessary to remove duplicates by key value name from the array with dictionaries. I tried the following: def remove_du ... : 'invalid.url:8080'}, \ {'description': 'First service another description', 'name': 'service_one', 'value': 'invalid.url'}

Working with python2.7 dictionaries

I have an array of numbers: 0x0000: 023d 0017 068e 98a7 b047 6520 8100 a100 0x0010: 425c 564c 414e 3040 b1d2 b1d2 0138 0000 ... '0x00a0']. Why are the keys displayed out of order, and at each when you restart the code, does this incorrect order persist?

Creating a dictionary based on data from a python txt file

There is a txt file with the data collected: UUU F CUU L AUU I GUU V UUC F CUC L AUC I GUC V UU ... string is the key for the value that has not yet been created. We need help in implementing such a dictionary for later use.

Adding a random element from an array of strings to a Dictionary in C#

In general, you need to add faculties to the dictionary Dictionary faculty, key-string, value-person(student or teacher). To ... this line is an addition so as not to look in the code: faculty.Add(faculties[rand.Next(faculties.Length)], new Student());

Random word generator in Russian

I need a word generator in python, I know that there is a Random-Words package for this. Are there any alternatives for other ... nse = requests.get(Word_site) WORDS = response.content.splitlines() But again, here is the import of the English dictionary

How to get data from a Python nested dictionary

There is a similar dictionary { "address": "0x544444444444", "ETH": { "balance": 444, "totalIn": 444 ... } ] } How to get the value of the "name" key from the first and second dictionary without using the json library.

Creating an array from nested Python elements

Hello everyone Please help me develop an algorithm. There is a source list consisting of dictionaries: [ { 'A': ... the first elements on each level, and I didn't know how to make a recursion for each branch obtained as a result of grouping.

Python3. Sorting the dictionary in descending order of values

You need to sort the dictionary in descending order of values, made up of the number of repetitions in the txt file of each c ... , эта строчка просто никак не влияет на вывод результата. print(b) I clearly don't understand something, please tell me

Dictionary C# (Russian - English translator)

I'm making an application that should provide a translation of English words into Russian. It should also be possible to writ ... //добавлении записи каждый раз вписывать новый индекс eng.Add(index, wordPl); pl.Add(index, wordEng); }

python unique word generator

Confused, help, tell me The task of the code is to write a 3 letter word that will not be repeated in the list import rando ... print (z) listToPrint += listSec(sec) z += 1 print (listToPrint) input('press key for exit')

Get a key by value

There is a dictionary: d = {'a': '1', 'b': '2', 'c': '3'} And there is a line: stroka = 'a3a2c' If the string element ... (d[i], end='') But I can't output the key by value: for j in stroka: if j in d.values(): print(?????, end='')

vk api python wall.get

Please tell me, I want to collect the number of entries from the wall in the vk, with the help of the vk api rs = vk.method( ... only regular expressions come to mind , but for sure you can somehow send a request to get only what I need. Please help me .

Python parse json: how to handle an exception when there is no key in the dictionary?

Trying to parse json with deep nesting, up to 10 elements, how to handle an exception when there is no key in the dictionary? ... debugging, ideally, you need to collect the key values in a string with a separator ; for subsequent import into the database

When creating a dictionary in Python 2.7, TypeError: 'dict' object is not callable

I want to create a dictionary from a two-dimensional list, where each sentence in the text is in a separate array. counts = ... line: 4 if word not in counts: 5 counts[word] = 1 TypeError: 'dict' object is not callable

VBA working with an array in a dictionary

Good afternoon, I think the question is very simple for professionals, but I myself am green and can not finish it. There is ... Set noname = someDicri.Item("someKey") Debug.Print noname(0) Et I of course can but damn it seems to me it is so bad form.

I can't add an item to the python 3 dictionary

Why can't I write d[Parent] += d1? Parent is a string, and d1 is a dictionary. Basically, it only allows you to add a string. ... a single value: #Теперь у нас есть ребенок и родитель. Это строки d1 = {Children : "misha567889"} print(d1) d[Parent] += d1