data.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}")
Resultado Python 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)] on win32
from datas import Data
d = Data(21,11,2007)
d.formatada()
21/11/2007