From 7c2e10861dbb2d36a9ae32fa3563e8c390ca1c4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Ot=C3=A1vio?= Date: Wed, 26 Oct 2022 08:10:28 -0300 Subject: [PATCH] Operadores in e not in --- aula24.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 aula24.py diff --git a/aula24.py b/aula24.py new file mode 100644 index 0000000..e7ea4dd --- /dev/null +++ b/aula24.py @@ -0,0 +1,21 @@ +# Operadores in e not in +# Strings são iteráveis +# 0 1 2 3 4 5 +# O t á v i o +# -6-5-4-3-2-1 +# nome = 'Otávio' +# print(nome[2]) +# print(nome[-4]) +# print('vio' in nome) +# print('zero' in nome) +# print(10 * '-') +# print('vio' not in nome) +# print('zero' not in nome) + +nome = input('Digite seu nome: ') +encontrar = input('Digite o que deseja encontrar: ') + +if encontrar in nome: + print(f'{encontrar} está em {nome}') +else: + print(f'{encontrar} não está em {nome}')