no arquivo datas.py:
class Data:
def __init__(self, dia, mes, ano):
self.dia = dia
self.mes = mes
self.ano = ano
def formatada(self):
print("{}/{}/{}".format(self.dia, self.mes, self.ano))
no console do python:
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)] on win32
from datas import Data
d = Data(27,2,1986)
d.formatada()
27/2/1986