On Tue, Dec 24, 2013 at 11:07 AM, <vanommen.rob...@gmail.com> wrote:

> Hello, for the first time I'm trying te create a little Python program.
> (on a raspberri Pi)
>
> I don't understand the handling of variables in a loop with Python.
>
>
> Lets say i want something like this.
>
> x = 1
> while x <> 10
>         var x = x
>         x = x + 1
>
> The results must be:
>
> var1 = 1
> var2 = 2
>
> enz. until var9 = 9
>
> How do i program this in python?
> --
> https://mail.python.org/mailman/listinfo/python-list
>

You might want to go to python.org and check out the documentation.  I
don't really understand what you are trying to do.  The var1, var2 stuff
doesn't make sense

In python you can loop like this:

for x in range(10):
  print x

This will print the numbers from 0 to 9.

But your best bet is to find a brief tutorial to get started.



-- 
Joel Goldstick
http://joelgoldstick.com
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to