2
I made a function that identifies if the person is using windows or linux, and with that runs the right command to clean cmd/terminal, worked on the visual studio code console, however when I will run the file . py it closes...
Code:
import os
import platform
def limpar():
if (platform.system() == 'Windows'):
os.system('cls')
if (platform.system() == 'Linux'):
os.system('clear')
https://answall.com/q/72678/112052
– hkotsubo
Important [Edit] the post and provide a [mcve] of the problem. In the given code the function is never called, and if added, it works normally.
– Bacco