<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[JfLam的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/JfLam</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; JfLam]]></copyright><item><title><![CDATA[Python字典基础]]></title><link>https://blog.youkuaiyun.com/JfLam/article/details/104445998</link><guid>https://blog.youkuaiyun.com/JfLam/article/details/104445998</guid><author>JfLam</author><pubDate>Sun, 23 Feb 2020 10:33:44 +0800</pubDate><description><![CDATA[Python字典基础

字典不关心顺序，而是关心键与值之间的对应关系
字典的定义

alien = {'color':'green','points':'2'}

alien['x']=90 #列表偏移量的位置更换成键名
alien['y']=50
print(alien)

&gt;&gt; {'color': 'green', 'points': '2', 'x': 90, 'y': 50}
...]]></description><category></category></item><item><title><![CDATA[Python 元组基础]]></title><link>https://blog.youkuaiyun.com/JfLam/article/details/104444810</link><guid>https://blog.youkuaiyun.com/JfLam/article/details/104444810</guid><author>JfLam</author><pubDate>Sat, 22 Feb 2020 16:09:22 +0800</pubDate><description><![CDATA[Python 元组基础

元组是不可变的列表，Python禁止对其中的元素进行修改
由圆括号组成
定义元组

dimensions = (20,40)
print(dimensions[0])
print(dimensions[1])

&gt;&gt; 20
&gt;&gt; 40


遍历元组

dimensions = (20,40)

for i in dimensions:
    pr...]]></description><category></category></item><item><title><![CDATA[Python 操作列表]]></title><link>https://blog.youkuaiyun.com/JfLam/article/details/104441148</link><guid>https://blog.youkuaiyun.com/JfLam/article/details/104441148</guid><author>JfLam</author><pubDate>Sat, 22 Feb 2020 15:36:33 +0800</pubDate><description><![CDATA[Python 操作列表

list() + range()
– 用range()函数迅速创建列表

numbers = list(range(1,11))
print(numbers)

&gt;&gt; [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]


一些简易处理数列的函数

numbers = list(range(1,11))
print(min(numbers))
pr...]]></description><category></category></item><item><title><![CDATA[Python 列表 排序]]></title><link>https://blog.youkuaiyun.com/JfLam/article/details/104440834</link><guid>https://blog.youkuaiyun.com/JfLam/article/details/104440834</guid><author>JfLam</author><pubDate>Sat, 22 Feb 2020 11:34:27 +0800</pubDate><description><![CDATA[Python 改变列表排列顺序  sort() + sorted() + reverse() 列表元素都为小写情况

sorted()函数 临时改变
– 按照字母顺序

name = ['sd','ad','lbj','kd']

print(name)
print(sorted(name))
print(sorted(name,reverse = True))
print(name)

&gt;...]]></description><category></category></item><item><title><![CDATA[Python数列中元素的增加和删除]]></title><link>https://blog.youkuaiyun.com/JfLam/article/details/104432009</link><guid>https://blog.youkuaiyun.com/JfLam/article/details/104432009</guid><author>JfLam</author><pubDate>Sat, 22 Feb 2020 11:13:41 +0800</pubDate><description><![CDATA[Python数列中元素的修改

添加元素
– list.append()
— 无需定义数列长度

name = []
key = True
while key:
    thing = input('Please enter a thing,press q to quit')
    name.append(thing)
    if thing == 'q':
        key = Fal...]]></description><category></category></item><item><title><![CDATA[Python 字符串删除空白问题 | 替换｜分割｜整合｜]]></title><link>https://blog.youkuaiyun.com/JfLam/article/details/104429260</link><guid>https://blog.youkuaiyun.com/JfLam/article/details/104429260</guid><author>JfLam</author><pubDate>Fri, 21 Feb 2020 16:16:04 +0800</pubDate><description><![CDATA[Python 字符串删除空白问题

var.strip(string)
–  用来删除字符串开头和结尾的空格

name = ' python'
print(name)
print(name.strip())

&gt;&gt; python
&gt;&gt;python


var.lstrip(string)
–  去掉开头的空格

name = ' python'
print(name)
p...]]></description><category></category></item></channel></rss>