![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python基础笔记
dabeam
前端程序员,分享自己的学习的知识
展开
-
python中关于str
capitalize 对字符串的第一个字符大写 Return a capitalized version of S, i.e. make the first character have upper case and the rest lower case. test = 'dabeam ' #在最前面添加空格 test = ' dabeam ' v = test...原创 2018-12-11 21:01:12 · 152 阅读 · 0 评论 -
python中list的相关用法
list也叫列表,list的格式一般为li_name = [1,2,‘age’] append 在列表最后追加一个值 li = [1,2,3,4,'hello',[11,22,'ok'],1111] li.append([1,2]) print (li) 输出结果: [1, 2, 3, 4, 'hello', [11, 22, 'ok'], 1111, [1, 2]] clear 清空列表...原创 2018-12-11 21:48:20 · 208 阅读 · 0 评论