0

Seen a few q's like these, nothing helped ): Is there a way of running a loop to check if a number is more than say, 100, and if so, do something? For example:

while x == 1: #DoStuff

and have this: running simultaneously in the background without waiting upon a user for their input?

if moneyLoop > 100:
    nCoins = nCoins + 1?
0

2 Answers 2

2

In order to do this you have a few options:

There are others if you google python parallelism libraries.

Sign up to request clarification or add additional context in comments.

Comments

1

Yes:
http://docs.python.org/2/library/threading.html#thread-objects

http://www.tutorialspoint.com/python/python_multithreading.htm

It's hard to tell in more detail what you need your code to do from the snippets given but this should point you in the right direction.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.