•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Python section within the Software Development category of DaniWeb, a massive community of 391,548 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,543 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Python advertiser:
Views: 29589 | Replies: 2
![]() |
•
•
Join Date: Feb 2006
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 0
Hi.....I am a newbie...really confused with do while loop in python. Does it even exist?
Sorry, I left out a few details caz its not important and just takes up space. My point is....how do I do this? I know this is not right, but is there a way?
Thanks a lot .....
J=[]
do:
finished = "false"
while finished != "true":
finished="true"
for j in xrange(len(lis2)):
cenP2 = G[i+G0]
if ((cenP2 == 0) & (sigma2 > 0)
J.append(1)
finished = "false"
print 3 # test code never gets here
else:
finished="true"
print 4
Sorry, I left out a few details caz its not important and just takes up space. My point is....how do I do this? I know this is not right, but is there a way?
Thanks a lot .....
•
•
Join Date: Oct 2004
Location: Mojave Desert
Posts: 2,394
Reputation:
Rep Power: 9
Solved Threads: 172
•
•
Join Date: Jun 2008
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
from //kogs-www.informatik.uni-hamburg.de/~meine/python_tricks
Godspeed 
Editors note:
For Python code on Daniweb:
Please use the [code=python] and [/code] tag pair to enclose your python code.
python Syntax (Toggle Plain Text)
while True: do_something() if condition(): break

Editors note:
For Python code on Daniweb:
Please use the [code=python] and [/code] tag pair to enclose your python code.
Last edited by vegaseat : Jun 11th, 2008 at 7:35 pm. Reason: added code tags
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Python Marketplace
- Starting Python (Python)
- here it is (Python)
- Endless Loops (Python)
- while loop question (Python)
Other Threads in the Python Forum
- Previous Thread: RE:Difference Between Python 2.3 and Python 2.4
- Next Thread: Help a Beginner with Python?



Linear Mode