Hello,

What are you trying to do? Split string? Copy array? You probably need to use 
builtin functions for that.


Ilya Kazakevich,
JetBrains PyCharm (Best Python/Django IDE)
http://www.jetbrains.com/pycharm/
"Develop with pleasure!"


>-----Original Message-----
>From: django-users@googlegroups.com
>[mailto:django-users@googlegroups.com] On Behalf Of hito koto
>Sent: Wednesday, June 11, 2014 3:22 PM
>To: django-users@googlegroups.com
>Subject: Django Python roop
>
>Hello, all
>
>I want to change to while statement from for statement, so how can i do to?
>
>this is my correct for statement codes:
>
>def fff(x):
>    y = []
>    for i in range(len(x)):
>        y.append(x[i])
>    return y
>
>and i want change to while statement
>
>So, this code have erroes:
>TypeError: list indices must be integers, not list def fff(x):
>    y = []
>    while x !=[]:
>       for i in x:
>           y.append(x[i])
>    return y
>
>
>--
>You received this message because you are subscribed to the Google Groups
>"Django users" group.
>To unsubscribe from this group and stop receiving emails from it, send an email
>to django-users+unsubscr...@googlegroups.com.
>To post to this group, send email to django-users@googlegroups.com.
>Visit this group at http://groups.google.com/group/django-users.
>To view this discussion on the web visit
>https://groups.google.com/d/msgid/django-users/1f5ae7ed-6fa2-4cf0-8ba7-d59
>088ba1cf5%40googlegroups.com
><https://groups.google.com/d/msgid/django-users/1f5ae7ed-6fa2-4cf0-8ba7-d5
>9088ba1cf5%40googlegroups.com?utm_medium=email&utm_source=footer> .
>For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/007601cf8573%244aa27dd0%24dfe77970%24%40JetBrains.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to