Posts by Ian Germano • 41 points
1 post
-
4
votes3
answers331
viewsA: Avoiding code duplication without the use of switch/case in the Python language
Usa Loop: for i in range(1,9,1): if data_hoje[0:2] == "0"+str(i): data_nova = data_hoje[1:2] + data_hoje[2::] else: data_nova = data_hoje for i in range(1,9,1): if data_hoje[0:2] == "0"+str(i):…