Some of your code or details of what you are trying to do would help.
But one way to do it is to have two processes, one process that reads from standard in
with raw_input()
, we can call it p1; and one that handles the data structure, in this case the list, we call it p2.
The two processes could communicate with message passing using sockets or what ever you want.
Then to be sure to avoid race conditions that new data is read in p1, but not yet updated in p2. Thus p2 will carry on and use the out of date data. One way to do this is using locks.