main.py
from datas import Data
data1 = Data(24, 10, 2023)
data1.formatada()
datas.py
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}')