Goto statement in python - what other way is there? -


my program has following scturcutre

  1. program takes screenshot 2, program looks condition a. if condition not met, need go point 1
  2. program looks condition b. if condition b not met, need go point 1
  3. program looks condition c. if condition c not met, need go point 1 ... etc

there around 20 additional conditions , whenever 1 of them not met, program should return starting point. goto statement solved. however, in python not option. suggestions appreciated how can implemented elegantly.

you should give code, or @ least example showing structure is.

maybe so:

take screenshot condition = (condition a) , (condition b) , ... , (condition z)  while (not condition):     take screenshot     condition = (condition a) , (condition b) , ... , (condition z) 

Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

wso2esb - How to concatenate JSON array values in WSO2 ESB? -