摘要:
1. 格式化输出:利用format "{1} {0} {1}".format("hello", "world") # 设置指定位置 'world hello world' 或 %s,%d % str1,int1* format的四种玩法(python推荐使用format做格式化输出) ```pyth 阅读全文
摘要:
**多层装饰器**需求:执行index()前,先认证,认证完成后计算index函数执行的时间```pythondict = {'user':'egon', 'pwd':'123'}import time#装饰器def auth(func): def inner(): user=input('用户名: 阅读全文
摘要:
操作系统:内核(管理硬件资源)+系统调用接口(为软件提供接口) 切换终端图形 >dos:终端中ctrl+shift+f2 或 ini 3dos >图形:ctrl+shift+f1 或 ini 5 修改主机名:方法1:hostname oldboy_vm1 方法2:vim /etc/sysconfig 阅读全文