Posts by jusintique • 37 points
4 posts
-
-1
votes1
answer115
viewsQ: Split subdictionaries in python
Good guys, I created a ICT, and I divided it using the function: listOfDicts = [{k:v for k,v in dictionary.items() if k%10==i} for i in range(10)] From that, I got 10 sublists: listOfDicts[0 a 9]…
-
0
votes1
answer343
viewsQ: Split dictionary in python
Good guys, even for help here from the forum, I got a function that creates sub-list from sub-lists according to the division by 10, is easier to understand with the code: def indexar(values): #…
-
0
votes2
answers265
viewsQ: Split sublist in python
Good team, I have a method that receives a list and from it creates sub-list and attaches in Buckets: def indexar(self, keys): buckets = [[] for _ in range(10)] for i in keys: for ii in range(10):…
-
0
votes1
answer79
viewsQ: Slice and store Ict in pyhon
I have the following class: class Buckts: def __init__(self, keys, palavras, tamanhoP): self.listaBuckts = dict() self.keys = list(keys) aux = list(zip(keys, palavras)) self.aux2 = list() for i in…