I'm trying to write code that receives two texts and thereafter I am writing code that finds common words among the texts. This is put in a new list. sys.stdin.read() is being used instead of input()
because I need to process a long piece of text.
Below is what I wrote thus far. When I run the code it seems to hang because its only asking for input for text1 and never reaches text 2 input request.
What is going on and how can I fix it?
size text 1 = approx. 500.000 chars.
size text 2 = approx. 500.000 chars.
import sys
text1 = sys.stdin.read()
print(text1)
text2 = sys.stdin.read()
print(text2)
# ... snippet ... compare code here ...