dictionary tag

93 questions


1 answers
98 views
0
Python Dictionary Clear Method

fruits_dic={'apple':6000,'melon':3000,'banana':5000,'orange':7000}fruits_dic.clear()print(fruits_dic)Result value{}-------------------------------------------------fruits_dic={'apple':6000,'melon':300...

2 years ago

1 answers
92 views
0
Python Dictionary Split Questions

Hello!Movie_data.txt is filled with data such as movie name, company, release date, etc., and I called this notepad and separated it by '|' and saved it in a dictionary called mydict.mydict = {}fp=ope...

2 years ago

2 answers
59 views
0
I would like to ask you to change the dictionary value according to the conditions.

data = {'sub': when you have ['s1', 's2', 's3', ...]}I want to change it like this, what should I do?//data = {'sub': ['s1', 's2', 's3']}for i in range(len(data)): if data['sub'][i] == 's1': data['su...

2 years ago
« - 10 -

© 2024 OneMinuteCode. All rights reserved.