arFiRubros = "C:\\sasa" if not os.path.exists(arFiRubros): arLoRubros = open(arFiRubros, "w+b") else: arLoRubros = open(arFiRubros, "r+b") class Rubros: def __init__(self): self.nombreRub = [None] * 3 for i in range (3): Rubros.nombreRub[i] = input("ingrese rubro")