class Data:
def __init__(self, dia, mes, ano):
self.dia = dia
self. mes = mes
self.ano =ano
def formatada(self):
print(f'{self.dia}/{self.mes}/{self.ano}')
Console:
from dsf import Data
d = Data(22, 6, 2023)
d.formatada()
22/6/2023