I am writing a function as main_call() which is continuously producing values. (+ve or -ve) I want to print on screen only for first +ve value and hold until -ve value comes around. here is my code:
def main_call(): while True: yield strategy() for value in main_call(): if(value>0): print '+ve' elif(value>0): print '-ve' else: pass Do I need to use threads or processes? -- https://mail.python.org/mailman/listinfo/python-list