> names = ['anne', 'beth', 'george', 'damon']
> ages = [12, 45, 32, 102]
> for i in range(len(names)):
> print names[i], 'is', ages[i], 'years old'
>
> now all of it makes sense to me except for the line for i in
> range(len(names)):
> the len statement calculates the number of characters
hi, an
bhaaluu wrote:
> Greetings,
>
> I'm also a beginner to Python, but I think I can answer
> your question. One of the best ways to learn about how
> anything in Python works is to use the Python interactive
> interpreter, so, away we go (follow along, please):
>
names = ['anne', 'beth', 'georg
Dale Pearl wrote:
> I'm reading Beginning Python - From Novice to Professional by Magnus Lie
> Hetland (an Apress book) and there is a code example that I need further
> explaining on to fully grasp.
> There is a section with samle code of:
> names = ['anne', 'beth', 'george', 'damon']
> ages =
Greetings,
I'm also a beginner to Python, but I think I can answer
your question. One of the best ways to learn about how
anything in Python works is to use the Python interactive
interpreter, so, away we go (follow along, please):
>>> names = ['anne', 'beth', 'george', 'damon']
>>> print names
[
I'm reading Beginning Python - From Novice to Professional by Magnus Lie
Hetland (an Apress book) and there is a code example that I need further
explaining on to fully grasp.
There is a section with samle code of:
names = ['anne', 'beth', 'george', 'damon']
ages = [12, 45, 32, 102]
for i in range