dictionary tag

93 questions


1 answers
105 views
0
The entered variable will appear once more.

a=(10, 'Hong')b=(11), 'im')c=(12), 'HAN'dic = dict((a, b, c))print ('Student Information:', dic)while True: x=int (input('Enter academic year:')) if x < 0: print (End Program) break elif x in dic: ...


1 answers
63 views
0
Python rows How to fill 5 even if the length is less than 5

Hello, masters! I'm asking a question because it doesn't work out well after trying it for a few days alone. def make_news_cnts(self): rows = self.get_news_issue() row_html = get_row_html(rows) new...

2 years ago

2 answers
100 views
0
How to divide the values of dictionaries

For example, a = {'apple': 12, 'banana': 20}b = {'Apple': 3, 'Banana': 6}Divide these two dictionaries into two {'Apple': 4, 'Banana': 3.33333} Isn't there a way to make it come out like this?

2 years ago

1 answers
71 views
0
Login error using dictionary. Incorrect number password match.

I wanted to create a login program using dictionaries Write down the password for the memberI made a program to check if the name is included or if the password of the member matches.We can check the ...

2 years ago

1 answers
75 views
0
Add Dictionary

Hello! Are there any dictionaries created through get_org_data, such as dateeal, org_name, cont_a dictionary, rk, stock_name,goal_value,gap_ratio dictionary created through get_for_data Is there a way...

2 years ago

2 answers
86 views
0
I have a question for Python Dictionary

dic={}for i in range(0,5): a = input('product name:') price = input('price:') dic[a] = priceprint(dic)for i in dic: sangpum = input (product to be purchased: ) if sangpum in dic: print(dic[price]) el...

2 years ago

1 answers
86 views
0
Add Python dictionary values and output them as strings

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) + ',' return...

2 years ago

1 answers
79 views
0
Store only values in a specific location in the dictionary

class Data(object): def __init__(self): self.name = list(rank.values())[0]dataset = Data()I want to extract only the first name from the dictionary named Rank in the picture and save it in the list, ...

2 years ago

1 answers
84 views
0
Dictionary related questions

In the table below, save the ice cream name as a key value and the list as a dictionary value. The dictionary is named inventory.Name price inventoryMelona 30020Bibibig 4003Jaws Bar 250 100That's what...

2 years ago

1 answers
99 views
0
Python Dictionary Search Question

a['321'] = {'a' : '123', 'b' : '456'}a['789'] = {'a' : '987', 'b' : '654'}When using multiple dictionaries directly without loading files in this way Search 321 using infinite loops and for statements...

2 years ago
« - 8 - »

© 2024 OneMinuteCode. All rights reserved.