
python入门
陈学卫的博客
做自己的一个博客
展开
-
python 解决 macos 报错Could not find PlaidML configuration file
pip install plaidml 然后添加环境变量 sudo vi ~/.bash_profile 添加以下代码 export PLAIDML_NATIVE_PATH=/usr/local/lib/libplaidml.dylib export RUNFILES_DIR=/usr/local/share/plaidml 然后 保存 运行 source ~/.bash_profile 问题解决原创 2021-10-11 14:26:04 · 397 阅读 · 0 评论 -
python入门练习习题 001
001 数字组合 题目: 有四个数字:1、2、3、4,能组成多少个互不相同且无重复数字的三位数?各是多少? 程序分析 遍历全部可能,把有重复的剃掉 方式一 遍历 i = 0 num = [1,2,3,4] for n in num : for u in num: for m in num : if((n != u)and(u!=m)and(n!=m)): print(n,u,m)原创 2021-05-06 16:50:45 · 196 阅读 · 0 评论