- 博客(2)
- 收藏
- 关注
原创 CentOS配置互信
ssh-keygen,生成密钥,可以输入秘密 ssh-copy-id -i /root/.ssh/id_rsa.pub node2, 将公钥拷贝到其他节点上 ssh node2即可不用输入密码登陆到node2上
2022-05-28 11:28:01
388
原创 lstrip/rstrip 和 removeprefix/removesuffix(Python 3.9)
最近在项目中遇到个问题,想把'user:user1'这个字符串的前缀user:删除掉,留取后面的user1,代码中使用了lstrip方法(用的是python2.7)。但是测试发现: print 'user:user1'.lstrip('user:') '1' 于是仔细查看了lstrip的文档说明: Return a copy of the string with leading characters removed. The chars argument is a string specifyi
2022-05-07 10:52:49
1346
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人