Posts by Carol • 23 points
4 posts
-
1
votes3
answers1465
viewsQ: Itemgetter - Sort list of dictionaries - Python
Suppose I have the following list of dictionaries: lista = [{"nome": "Maria", "idade": 15}, {"nome": "João", "idade": 26}] And I’m using the following function to sort: ordenar = sorted(lista,…
-
-2
votes3
answers127
viewsQ: Python Max Value Lists
I have a question about the lists in python. Suppose I have one lista1, with name, store and sales value, I have to return the name of the person who sold the most. example: vendedores= [{"nome":…
-
0
votes1
answer734
viewsQ: Regex in Python Validate E-mail
Good morning! valid = re.search(r'^[a-zA-Z0-9._-]+@[a-zA-Z0-9]+\.[a-zA-Z\.a-zA-Z]{1,3}$', email) I have this regular expression, and there are some rules to return the correct emails, are 8 tests,…
-
-3
votes2
answers50
viewsQ: Error in Python method call (list)
Good afternoon! I am receiving an error name 'Month' is not defined because of the last method of this code: self.calc_months(month_of_year) def year(self, execution_times): return…