From 33b1753ea88c2d2e0b0afe3e4f732a3870e8d7a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Ot=C3=A1vio?= Date: Mon, 24 Oct 2022 14:32:01 -0300 Subject: [PATCH] =?UTF-8?q?Coer=C3=A7=C3=A3o=20de=20tipos=20(converter=20u?= =?UTF-8?q?m=20tipo=20em=20outro)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aula6.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 aula6.py diff --git a/aula6.py b/aula6.py new file mode 100644 index 0000000..f467b9a --- /dev/null +++ b/aula6.py @@ -0,0 +1,9 @@ +# conversão de tipos, coerção +# type convertion, typecasting, coercion +# é o ato de converter um tipo em outro +# tipos imutáveis e primitivos: +# str, int, float, bool +print(int('1'), type(int('1'))) +print(type(float('1') + 1)) +print(bool(' ')) +print(str(11) + 'b')