Posts by Lucas Moraes • 189 points
5 posts
-
1
votes1
answer400
viewsQ: Plotting file . xls with matplotlib and openpyxl
Having the following content in my file . xls: Belo Horizonte - MG 2278.8 Porto Alegre - RS 1647.8 Recife - PE 2434.9 Rio de Janeiro - RJ 1653.6 Salvador - BA 2324.1 São Paulo - SP 2227.5 Total of…
-
2
votes1
answer233
viewsQ: Operation of the push method
In the code: import heapq class PriorityQueue: def __init__(self): self._queue = [] self._index = 0 def push(self, item, priority): heapq.heappush(self._queue, (-priority, self._index, item))…
-
7
votes1
answer1156
viewsQ: What is the functionality of the "heapify" method of the heapq module?
What is the method for heapify library heapq python? How could I use it in a list, for example?
-
12
votes2
answers3744
viewsQ: How does the "for" inline command work?
I made a question about a Python algorithm, but reply of user Anderson Carlos Woss he used a kind of for inline that I had never seen and that left me confused. Follow the code section corresponding…
-
1
votes1
answer1748
viewsQ: How to implement a Python permutation algorithm?
I’m trying to implement a Python permutation algorithm. He receives as input a phrase and a key (numerical value) which corresponds to the number of letters that each group should have, and finally,…