Posts by Fujimoto • 27 points
3 posts
-
0
votes2
answers16445
viewsQ: How do I delete a file from a python folder
the code below lists the files of a particular directory, wanted to know how I do to delete only 1 file from this directory def etc(): path ="diretorio"` dir = os.listdir(path) for file in dirs:…
-
1
votes1
answer1548
viewsQ: Condition python Matrices
My Code: m1 = [[1, 2, 3], [4, 5, 6]] m2 = [[2, 3, 4], [5, 6, 7]] def soma_matrizes(m1, m2): matriz_soma = [] linhas = len(m1) colunas = len(m1[0]) for i in range(linhas): matriz_soma.append([]) for…
-
1
votes1
answer55
viewsQ: Other ways to make matrix
I managed to develop so far, you should not print spaces after the last element of each line which makes the exercise go wrong, someone knows another method ? minha_matriz= [[1,2,3],[4,5,6],[7,8,9]]…