Posts by armatita • 184 points
3 posts
-
1
votes1
answer1198
viewsA: Remove duplicates from a list keeping order
If I understood the problem well then the following solution should solve the problem: somas = [] listas = [] for i in range(len(indice)): valor = A[indice[i]] soma = 0 listas.append([]) for j in…
-
0
votes1
answer131
viewsA: Initial input of a list after using set
If I understand correctly what you’re trying to do next should solve the problem: indice=[] feitos = [] # vou guardar aqui todas as chaves que já ocorreram no loop. indic = {} # Se quiseres ter uma…
-
2
votes1
answer5773
viewsA: How to specify values for my x-axis using matplotlib.pyplot?
The values of matplotlib are simply in scientific notation. It is possible to turn off the scientific notation but may give rise to other problems (such as having overlaid text). A more definitive…