Python Develop Tips

2021-01-03  本文已影响0人  Tate_code

1.使用pip3 安装Python3 的资源库

pip3 install xlwt
或者想要一次性安装多个库需要把需要安装的库放在requirements.txt,使用pip3安装的可以使用指令
pip3 install -r requirements.txt

2.python 合并拼接字符串

>>> a = ["hello", "world"]
>>> a
['hello', 'world']
>>> ' '.join(a)
'hello world'
>>> ','.join(a)
'hello,world'
>>> ''.join(a)
'helloworld'

3.使用pip3 list 查看当前已安装的库和版本

上一篇 下一篇

猜你喜欢

热点阅读