📜  控制台清除python代码示例

📅  最后修改于: 2022-03-11 14:45:55.830000             🧑  作者: Mango

代码示例4
def clear(): 
  
    # for windows 
    if name == 'nt': 
        _ = system('cls') 
  
    # for mac and linux(here, os.name is 'posix') 
    else: 
        _ = system('clear')