dictionary tag

93 questions


1 answers
126 views
0
To find a key with a value in the dictionary...?

You want to find a name by age in a dictionary that stores a key-value pair with a name as key and an age as value.I can compare ages or find values, but I don't know how to access keys. list = {'geor...

1 years ago

1 answers
108 views
0
There are some strange things about Python dictionary generation.

Hello, I'm a beginner at Python.The data in the csv file are in the first line, Rank, Major_code, and so onThere are data from the next line. I'm making a dictionary by combining the first line data a...

1 years ago

2 answers
55 views
0
I'd like to pick out what I need from the dictionary list and save it on the list crying

{ code: 0000031852, title: Girls Ballet Tutu Zebra Hot Pink}In a dictionary list like this Find only those that contain the Pink string in the title How do I save the code value to the list? T.T

1 years ago

1 answers
64 views
0
[python question] How should Python handle the collection of .net?

Hello. I was working on development related to .Net, and recently I had to deal with RP4.I've been developing Python recently.Because the direction of the data type or logic processing is somewhat dif...

1 years ago

2 answers
57 views
0
I'd like to compare and integrate dictionary values in Python.

While performing the Emotional Analysis task, you created a list-dictionary containing individual key values and value values as follows:tempDict = [{'Entity': 'No', 'Feature': 'GEN', 'Nagative': 1, '...

1 years ago

1 answers
77 views
0
Can the information stored in Python remain after turning off the computer?

Can the information stored in Python remain after turning off the computer?emphasized text

1 years ago

2 answers
122 views
0
I'm curious about how to save Python Dictionary

friends = {}for i in range (0,3,1) : friends = {'name': input('name:')', 'tel':input('phone number:')', 'addr':input('address:')', 'age':input('age:')}print(friends)I'm saving the addresses of three f...

1 years ago

1 answers
121 views
0
Remove from Python Dictionary

w_count={}lists=[Night, Smile, Joke, Dawn, Dawn, Crying, Smile]for i in lists: try: w_count[i]+=1 except: w_count[i]=1for i in w_count: if w_count.get(i)==1: w_count=w_count.pop(i)print (w_count)Disp...

1 years ago

1 answers
54 views
0
I have a question about adding, deleting, and modifying the Python Dictionary.

When adding a new value to the python dictionary, Error 'dictionary changed size duration' occurs.I selected the data in the table and put the value in search_dictionary (Type:dictionary).Value Type i...

1 years ago

1 answers
69 views
0
Add Python Dictionary Value and Output to String

class HashMap: def __init__(self): self.vals = {} def insert(self, key, val): self.vals = {key:val} def __str__(self): result = '' for i in self.vals.items(): result = result + str(i) + ',' retu...

1 years ago
« - 2 - »

© 2024 OneMinuteCode. All rights reserved.