Fatiamento de strings e a função len

This commit is contained in:
Luiz Otávio
2022-10-26 11:48:44 -03:00
parent b72557a580
commit d1cd77c150

11
aula27.py Normal file
View File

@@ -0,0 +1,11 @@
"""
Fatiamento de strings
012345678
Olá mundo
-987654321
Fatiamento [i:f:p] [::]
Obs.: a função len retorna a qtd
de caracteres da str
"""
variavel = 'Olá mundo'
print(variavel[::-1])