Latest web development tutorials

Python incluye ejercicios 60

Python 100 Li Python 100 Li

Título: calcular la longitud de cadena.

Análisis del programa: Ninguno.

Código fuente:

#!/usr/bin/python
# -*- coding: UTF-8 -*-

sStr1 = 'strlen'
print len(sStr1)

La salida del ejemplo anterior es:

6

Python 100 Li Python 100 Li