Posts by Eduardo Marques • 143 points
5 posts
-
2
votes4
answers246
viewsA: How do I organize each position on my list in ascending order?
All the answers solve the problem, but the answer given by @Thiago Magalhães is the one that most relates to my doubt. a = [[3,2,1],[4,3,2],[5,4,3]] for i in range(0, len(a)): a[i].sort() print(a)…
-
3
votes2
answers169
viewsQ: How do I delete empty lists from my list?
I have the following txt file: 1 2 3 4 5 6 7 8 9 2 3 4 5 6 7 6 8 9 3 4 5 6 7 7 8 8 9 1 2 3 4 5 6 7 8 9 4 5 6 7 8 9 10 11 5 6 7 6 7 8 8 9 15 when opening it and generating a list of lists many…
-
2
votes1
answer280
viewsQ: How do I intersect each position on my list?
I tried it in the following ways based on answers achieved here in the forum. First form: A = [[1,2,3,4,5,6,7,8,9,10],[1,3,5,7,8,9,10,20],[4,5,7,13,16,20,21,30]] B = [1,2,3,4,5,6,7,8,9] C =…
-
3
votes4
answers246
viewsQ: How do I organize each position on my list in ascending order?
This is my code: a = [[3,2,1],[4,3,2],[5,4,3]] for i in range(0, len(a)): for j in range(0, len(a[i])): a[i].sort() print(a) The problem is that it is only organizing the first position. Someone…
-
1
votes2
answers872
viewsQ: How to know how many numbers in one list are repeated in others?
I have four lists of their values: A = [1,2,3,4,5,6,7,8,9,10] B = [1,2,3] C = [4,5,6] D = [7,8,9,10] Would it have any function to compare list A with the other three lists and tell how many numbers…