Posts by Moises Maia • 24 points
2 posts
-
0
votes2
answers66
viewsA: List counting elements
set() does not allow repeated values. If you want to add 3 times the same value (1) you should use list(), not set(). >>> lista = [0, 0, 1, 1, 1] >>> print(sum(lista)) 3…
-
0
votes1
answer63
viewsA: How to import files using REGEX?
You can create a Pattern with the desired name, and possible extensions. Supposing you wish to search for png., or jpg image. or gif image. within c:/test import re import os padrao =…