简体   繁体   中英

how do I import replit module to python?

I made a blackjack game and a calculator following an online tutorial, however the only tutorial used replit module (from replit import clear -> clear() ) (replit being the website/online interpreter). I am now trying the same program in vscode:

  1. is there a way to import replit to vscode?
  2. is there a similar module to get the same result? I have seen some people make suggestions to clear console but they all seem to depend on which OS I am running, since my desktop is windows and laptop is mac I want something that can work on both.

Did you try "import os" at the beginning of code and using "os.system('clear')"? This should work on any OS or code editor/IDE.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM