很多新手刚开始学习python的时候经常会看到python 中__name__ = \'__main__\' 这样的代码,可能很多新手一开始学习的时候都比较疑惑,python 中__name__ = '__main__' 的作用,到底干嘛的?有句话经典的概括了这段代码的意义:“Make a script both importable and executable”意思就是说让你写的脚本模块既...【阅读全文】
#coding:utf-8#定义md5生成函数def md5(object): import hashlib md5=hashlib.md5() md5.update(object) return md5.hexdigest()#模拟注册账号zhdb={}def register_user(user,passwd): if user not in zhdb.keys(): zhdb[user]=md5(user+passwd+'abc')&nbs...【阅读全文】
1、报错信息如下:[plain] view plain copy print?[root@develop bin]# yum [root@develop local]# yum -y install prce There was a problem importing one of the Pytho...【阅读全文】