All Questions
2 questions
-1
votes
1
answer
449
views
How to read user input and at the same time execute periodic commands
How would I go about prompting user-input, while at the same time running timers, to periodically execute automatic functions.
Pseudo-code to illustrate:
while true
{
if input() OR timer(10)
...
2
votes
1
answer
608
views
Break big method into 2 methods, first containing a "for" loop and second a "break"
A method grew too big for its own good, and I need to break it up into two separate methods.
def big_method(dct):
# Initial code
# ...
for i in dct:
# More code
# ...
...