Please enable JavaScript.
Coggle requires JavaScript to display documents.
STRINGS - Coggle Diagram
STRINGS
Secuencia de caracteres
1) Orden
2) Indice
Nùmero
Inicia en Cero
Slicing
[desde : hasta_NO_incluido]
[ :hasta_no_incluido]
[desde:]
Número negativo, indica de atrás hacia adelante
3) Se pueden RECORRER (iterable)
Con el Ciclo FOR
PARA CADA elemento EN una estructura ITERABLE
CADA iteración TOMA un elemento de la ESTRUCTURA (string)
CADA iteración TOMA un CARACTER del STRING
for VARIABLE in ESTRUCTURA
for c in texto:
for cualquier in "hola":
Operadores
Concatenar
+
Operandos tipo string
Resultado tipo STRING
Repetir
*
Operando STRING y un Op. ENTERO integer
Resultado tipo STRING
Contiene? (no Contiene)
in (not in)
Operandos tipo STRING string
Resultado tipo BOOLEANO bool
Siempre en comillas
" "
' '
funciones
len()
recibe un string
retorna entero
STRING PRIMERO
.lower()
Reciben nada
retornan String
.upper()
Reciben nada
retornan String
.lower()
.swapcase()
.count()
.replace()