list tag

251 questions


2 answers
61 views
0
Python question Ability to convert from numbers to characters in a list at once

Is there a shortcut or code in the list that automatically converts numbers into characters?For example, a = [1,2,3,4,5] If it's like this, Any shortcut, module, or code at a timea = ['1','2','3','4',...

2 years ago

1 answers
61 views
0
You want to get this value from Python 3 list.

list = [{'`ur`l': 'https://cdn.discordapp.com/attachments/388321676150046720/390998168218894340/unknown.png', 'proxy_url': 'https://media.discordapp.net/attachments/388321676150046720/3909981682188943...

2 years ago

1 answers
92 views
0
I have a Python map function question.

The first factor in the map function that's useful in Python is the function The second factor is, I don't know exactly what it means to be a repeatable data type.And if the return type is a list type...

2 years ago

1 answers
99 views
0
Please give me a simple Python algorithm question!

list = [{'id':'hello'','name':'kim','address':'seoul'},{'id:'hello','name':'choi','address':'busan'}]If there's a dictionary on the list,If the id value is the sameI want to combine the name and addre...


1 answers
115 views
0
Python List, Dictionary Approach Question

x = {'a': ['aaa', 'bbb'], 'b': ['aaa', 'ccc'], 'c': ['bbb', 'ccc']}y = []for i in x['a']: if i in x['c']: y.append(i) print(y)If you write it like this, only [bbb] comes outI want to print 'a' and '...

2 years ago

3 answers
78 views
0
I'd like to combine the dictionaries if the value value of one key is the same in several dictionaries.

[{'a': 567.0, 'inventory_code': 'SA100426'}, {'a': 1038.94, 'inventory_code': 'SA100426'}]In these dictionaries on the list,If the value of the inventory code is the same, I would like to combine the ...

2 years ago

1 answers
81 views
0
I'd like to convert the list into a collection

list2007 = []for i in range(len(res2007)): a = res2007[i][0] list2007.append(a)set2007 = set([list2007])TypeError Traceback (most recent call last) in ()----> 1 set2007 = set([list2007])TypeEr...

2 years ago

1 answers
112 views
0
I'm working on a code to input and output files on Python, but I don't know where I got it wrong crying

`python>inputfile=open(ALE.txt,r)outputfile=open(ALE2.txt,w)list1=[]for line in inputfile:Team,Won,Lost=line.split(',')Won=int(Won)Lost=int(Lost)Percentage=round((Won)/(Won+Lost),3)list1.append([Perce...

2 years ago

1 answers
59 views
0
When substituting the list for %-15s in python,

def manual() : menuList = [1. Determining the root of the quadratic equation], 2. Finding the internal branch, 3. Finding the external branch, 4. Find the center of gravity, 5. Read the instructions...

2 years ago

1 answers
103 views
0
There's a problem with the repeat statement

import randomlst = list()for i in range (0,10,1) : lst.append(random.randint(0,100))print(lst)maxidx = 0for i in range(0,10,1): if lst[maxidx]<lst[i] : maxidx=itmp =lst[maxidx]lst[maxidx] = lst[9]...

2 years ago
« - 6 - »

© 2024 OneMinuteCode. All rights reserved.