摘要:
获取路径 import os //导入模块 print(os.getcwd()) //打印当前路径 os.chdir("C:\\Windows\\System32") //修改当前路径 print(os.getcwd()) 增删目录文件 os.makedirs("E:\\a\\b") //创建目录, 阅读全文
摘要:
一、定义一个函数 def hello(name): print('hello ' + name) name = input('请输入您的用户名: ') hello(name) 二、多参数 def hello(name1,name2): print('hello ' + name1 + ' ' +na 阅读全文
摘要:
循环遍历字典 user = {'admin1':'123456','admin2':'test123','admin3':'admin888'} //定义一个字典 for item in user.items(): if item[0] == 'admin' and item[1] == 'admi 阅读全文