2 Answers
+ 3
Kuba's solution is better than my strategy here: sockets -- which is neither simple nor robust.
Outside SoloLearn are more options, my personal favorites:
import requests, json
...which in comparison is like a nice happy dream.
I'm linking two samples for your information (intended to be outside of voting):
Outside SL. Using requests + json. This was written as a home companion to sockets (and the first time I got Python pseudo-persistence here)
https://code.sololearn.com/c37XERvwb2Cz/?ref=app
Inside SL. More mature sockets as I got used to it (fragile, non-portable socket code after the #####'s)
https://code.sololearn.com/c1AHY6gxx8r7/?ref=app