简单来说,expression是表达式,不是程序。 如 3 + 5, (let b = 3) in b + 5 而statement,可以理解为最短的程序。 如 a = 3 + 5 ( let a = 3 + 5) https://stackoverflow.com/questions/472807 ...
分类:
其他好文 时间:
2021-04-19 15:06:10
阅读次数:
0
paramiko基于SSH连接ssh Server执行操作(SSHClient远程连接,SFTPClient上传下载) pip install paramiko 简单示例 import paramiko ssh = paramiko.SSHClient() # 创建ssh客户端 know_hosts ...
分类:
编程语言 时间:
2021-04-19 14:58:53
阅读次数:
0
from threading import Thread # 方式一 # def sub_thread(): # for i in range(11): # print(i) # def main(): # t = Thread(target=sub_thread) # t.start() # fo ...
分类:
编程语言 时间:
2021-04-19 14:46:14
阅读次数:
0
当我们程序遇到异常时,会导致程序中止运行,见如下例子: def test(): a = int(input("please input:")) b = int(input("please input:")) result = a / b print(result) def test_1(): pri ...
分类:
编程语言 时间:
2021-04-19 14:38:29
阅读次数:
0
安装第三方插件数据:pip install plmysql 安装到了本地python引用 代码调用 首先在python 文件中导入 import pymysql 看是否成功 ,成功则可连接,以上安装成功若导入还有问题重启一下python 即可 import pymysqlconnect =pymys ...
分类:
数据库 时间:
2021-04-19 14:36:30
阅读次数:
0
https://www.git-scm.com/docs/git-pull https://www.runoob.com/git/git-pull.html https://www.yiibai.com/git/git_pull.html https://www.runoob.com/git/git ...
分类:
其他好文 时间:
2021-04-19 14:14:27
阅读次数:
0
1、看了https://www.cnblogs.com/hizhaolei/p/10001459.html 必须是专业版的pycharm, 学生使用edu.cn邮箱可以免费申请(nice) Interpreter解释器:用来跑代码 那就应该用服务器的解释器 所以第一件事是 配置pycharm的解释器 ...
分类:
其他好文 时间:
2021-04-16 12:07:10
阅读次数:
0
dict1={'name':'Lara','age':18} #判断键在不在字典中 for one in dict1: if 'name' in dict1:#或dict1.keys() print('key在字典中!') break #判断值在不在字典中 for one in dict1: if ...
分类:
编程语言 时间:
2021-04-16 12:04:54
阅读次数:
0
redis卸载:后配安装https://blog.csdn.net/isea533/article/details/84550237 一、使用redis的List类型结合lpush 和 brpop 来实现 简介 首先redis的List 相当于一个队列,可以实现先进先出的规则 采用brpop 是因为 ...
分类:
编程语言 时间:
2021-04-16 11:57:48
阅读次数:
0
# 捕获异常,异常之后,代码不再执行 try : a = 1/0 except ZeroDivisionError as e : print('出异常了,原因:',e) except IOError as e: print('IO异常,原因:', e) except ValueError as e: ...
分类:
编程语言 时间:
2021-04-16 11:51:04
阅读次数:
0