[pyar] cadenas de texto

Juan P Alesandri jp en alesandri.com.ar
Lun Jul 4 09:51:38 ART 2011


2011/7/4 p8queen <p8queen en gmail.com>

> #!/usr/bin/python
>
> str = "THIS IS STRING EXAMPLE....WOW!!!";
> print str.isupper();
>
> str = "THIS is string example....wow!!!";
> print str.isupper();
>
> fuente: http://www.tutorialspoint.com/python/string_isupper.htm
>
> Si queres saber cuantos caracteres son mayusculas ?
>
> cad  = "Hola Mundo"
> sum([x.isupper() for x in cad])
>
>
> Esto es "a la python" .
>
> Buenisimo el aporte Gustavo!! Muchas gracias!
-- 
Saludos
Juan Pablo Alesandri
GNU/Linux Registered User:#333844
GnuPG Public Key ID: 8A2B7F96
---
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://listas.python.org.ar/pipermail/pyar/attachments/20110704/f20abe8c/attachment.html>


More information about the pyar mailing list