251 questions
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',...
list = [{'`ur`l': 'https://cdn.discordapp.com/attachments/388321676150046720/390998168218894340/unknown.png', 'proxy_url': 'https://media.discordapp.net/attachments/388321676150046720/3909981682188943...
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...
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...
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 '...
[{'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 ...
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...
`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...
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...
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]...
« | - 6 - | » |
© 2024 OneMinuteCode. All rights reserved.