Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class cep():
- def __init__(self, cep):
- self.cep = str(cep)
- self.formatado = ""
- def get(self):
- for i in range(0,9):
- self.formatado += self.cep[i]
- if i == 5:
- self.formatado += "-"
- def set(self):
- return "Seu cep é {}" .format(self.formatado)
- victor = cep(123456789)
- victor.get()
- print (victor.set())
- lucas = cep(789456123)
- lucas.get()
- print (lucas.set())
Add Comment
Please, Sign In to add comment