Skip to content

Commit ade57a1

Browse files
committed
Criação método cumprimentar
1 parent 83043b0 commit ade57a1

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

oo/pessoa.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
11
class Pessoa:
2-
pass
2+
def cumprimentar(self):
3+
return f'Olá {id(self)}'
4+
5+
6+
if __name__ == '__main__':
7+
p = Pessoa()
8+
print(Pessoa.cumprimentar(p))
9+
print(id(p))
10+
print(p.cumprimentar())

0 commit comments

Comments
 (0)