Python小注意点
琪琪汉娜
这个作者很懒,什么都没留下…
展开
-
Python 命令行程序开发
获取用户输入(字符串)https://blog.csdn.net/liuyingying0418/article/details/100126348导入其他路径文件import syssys.path.append(file folder)原创 2021-06-11 21:48:29 · 243 阅读 · 0 评论 -
jupyter配置虚拟环境
未配置虚拟环境时环境如下查看系统中已有虚拟环境conda info -e将quantum_testing虚拟环境添加进jupyter为虚拟环境添加ipykernel包conda install -n quantum_testing ipykernel激活这个环境python -m ipykernel install --userjupyter添加虚拟环境后的选项...原创 2021-04-14 15:50:10 · 162 阅读 · 0 评论 -
LeetCode 104 二叉树最大深度(DFS和BFS)注意Python3中deque(双向队列)的初步使用方法
题目描述有很多解法递归class Solution(object): def maxDepth(self, root): """ :type root: TreeNode :rtype: int """ if root == None: return 0 return max(self.maxDepth(root.left),self.maxDepth(root.right原创 2020-08-11 14:51:37 · 286 阅读 · 0 评论 -
Python for循环 从大到小
for循环语句输入如下for i in range(10,1,-1): print(i)打印结果为1098765432原创 2020-08-20 14:52:54 · 18798 阅读 · 0 评论