From 0e4d9db7025c89b0db61bdd285c64f4c8eeac47a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Ot=C3=A1vio?= Date: Thu, 3 Nov 2022 07:45:44 -0300 Subject: [PATCH] =?UTF-8?q?M=C3=A9todos=20=C3=BAteis=20do=20tipo=20set=20e?= =?UTF-8?q?m=20Python?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aula78.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/aula78.py b/aula78.py index 59ab128..5ddb981 100644 --- a/aula78.py +++ b/aula78.py @@ -28,6 +28,14 @@ # Métodos úteis: # add, update, clear, discard +s1 = set() +s1.add('Luiz') +s1.add(1) +s1.update(('Olá mundo', 1, 2, 3, 4)) +# s1.clear() +s1.discard('Olá mundo') +s1.discard('Luiz') +print(s1) # Operadores úteis: # união | união (union) - Une