dictionary tag

93 questions


1 answers
74 views
0
How do I turn std::map to repeat?

std::map< std::string, std::map<std::string, std::string> >My brother m[name1][value1] = data1;m[name1][value2] = data2;m[name2][value1] = data1;m[name2][value2] = data2;m[name3][value1] =...


1 answers
61 views
0
I want to add or multiply the same key values in the dictionary file

P1 {'amphibolite.txt': 0.00593448307396262, 'basalt.txt': 0.00513281304394720, 'breccia.txt': 0.00501607343520665}P2 {}P3 {'amphibolite.txt': 0.00484181658252891, 'siltstone.txt': 0.00486999982527626}...

1 years ago

1 answers
68 views
0
Python, I have a questionDragon

a=input()print(a['birth'])In input brackets, {'birth' : '1234', 'name' : 'abc'} are all yours, is there any way to get an error? Please tell me why there is an error ㅠ

1 years ago

2 answers
57 views
0
ValueError: too many values to unpack in the Python Dictionary for Moon

n = int(input('Enter number of products : '))prod = {}for i in range(n): ProductName = input('Enter product name : ') ProductPrice = int(input('Enter its price : ')) prod[ProductName] = ProductPricepr...

2 years ago

1 answers
72 views
0
Can't I use the function as a dictionary value?

For example,Assuming that the functions draw_nose and draw_eye are defined drawing = { 'nose' : draw_nose, 'eye' : draw_eye}Define a drawing dictionary and If I enter the key value of the dictionary, ...

2 years ago

1 answers
76 views
0
I want to print a key that contains a specific character in the dictionary.

For example, I want to print only keys that contain 'a' characters in the dictionary named 'dics = { 'abdc' : 1234, 'abbbd' : 1244, 'adffbg' : 1255, 'bbbffgrg' = 1666}. How do I print them?

2 years ago

1 answers
123 views
0
Questions about setting up Python Dictionary!

name = [Gayeon, Nayeon, Dayeon, ...., Hayeon]test1 = [20, 98, ..., 86]test2 = [50, 39, ...,39]and How do I set the name to key and test1, test2 to value in the function info??I want to bundle the valu...

2 years ago

1 answers
92 views
0
Dictionary storage using beautiful soup4

from urllib.request import urlopenfrom bs4 import BeautifulSoupresponse = urlopen(https://music.naver.com/listen/top100.nhn?domain=TOTAL&duration=1d)b_html = response.read()s_html = b_html.decode(...


1 answers
67 views
0
You are trying to print out a dictionary-specific value in the list

[{'name': 'name', 'age': 1, 'kind': 'n'}, {'name': 'value', 'age': value, 'kind': 'value'}, {'name': 'value', 'age': value, 'kind': 'value'}]The list is stored in this way, but I don't know how to set...

2 years ago

1 answers
79 views
0
I want to extract the keys from the two dictionaries and divide only the same key into one dictionary again.

// Use three dictionaries.Output A > {'ACG': [0], 'CGT': [1], 'GTT': [2], 'TTC': [3], 'TCC': [4], 'CCG': [5], 'CGG': [6, 10, 15]}Output B > {'AAT': [0], 'ATA': [1], 'TAT': [2], 'ATC': [3], 'TCC'...

2 years ago
« - 6 - »

© 2024 OneMinuteCode. All rights reserved.