<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[wangwangwang68的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/wangwangwang68</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; wangwangwang68]]></copyright><item><title><![CDATA[笨方法学pyhon 练习41]]></title><link>https://blog.youkuaiyun.com/wangwangwang68/article/details/103076942</link><guid>https://blog.youkuaiyun.com/wangwangwang68/article/details/103076942</guid><author>wangwangwang68</author><pubDate>Thu, 14 Nov 2019 23:20:25 +0800</pubDate><description><![CDATA[敲了小一个小时才敲完的，代码如下，拿走不谢
from sys import exit
from random import randint

def death():
    quips = ["You died. You kinda suck at this.",
             "Nice job, you died...jackass.",
             "Such a...]]></description><category></category></item><item><title><![CDATA[笨办法学python 练习40字典]]></title><link>https://blog.youkuaiyun.com/wangwangwang68/article/details/103075025</link><guid>https://blog.youkuaiyun.com/wangwangwang68/article/details/103075025</guid><author>wangwangwang68</author><pubDate>Thu, 14 Nov 2019 21:21:49 +0800</pubDate><description><![CDATA[这一节练习我看了很久，主要纠结在两个地方：
cities['_find'] = find_city
city_found = cities['_find'](cities,state)

这两个地方其实练习41有讲到原理，但是刚开始我理解不了，感觉代码写的非常绕。后来才发现作者是为了在代码中体现字典的作用而故意这样写的。。。
以下附上源代码以及最后两行改进的代码
cities = {'CA': '...]]></description><category></category></item><item><title><![CDATA[笨方法学python 练习26 考试]]></title><link>https://blog.youkuaiyun.com/wangwangwang68/article/details/102992528</link><guid>https://blog.youkuaiyun.com/wangwangwang68/article/details/102992528</guid><author>wangwangwang68</author><pubDate>Sat, 09 Nov 2019 22:07:16 +0800</pubDate><description><![CDATA[改正代码如下
def break_words(stuff):
    """This function will break up words for us."""
    words = stuff.split(' ')
    return words

def sort_words(words):
    """Sorts the words."""
    return sorted(wo...]]></description><category></category></item><item><title><![CDATA[笨办法学python练习17]]></title><link>https://blog.youkuaiyun.com/wangwangwang68/article/details/102976962</link><guid>https://blog.youkuaiyun.com/wangwangwang68/article/details/102976962</guid><author>wangwangwang68</author><pubDate>Fri, 08 Nov 2019 17:25:53 +0800</pubDate><description><![CDATA[先上代码
from sys import argv
from os.path import exists

script,from_file,to_file = argv  # 解包

print("Copying from %s to %s" %(from_file,to_file))  # 打印，从A复制粘粘贴到B

# we could do these two on one line to...]]></description><category></category></item><item><title><![CDATA[笨办法学python 练习15.读取文件]]></title><link>https://blog.youkuaiyun.com/wangwangwang68/article/details/102976689</link><guid>https://blog.youkuaiyun.com/wangwangwang68/article/details/102976689</guid><author>wangwangwang68</author><pubDate>Fri, 08 Nov 2019 17:16:57 +0800</pubDate><description><![CDATA[先上代码
from sys import argv
script , filename = argv  # filename 这个名字的文件夹需要提前存在,与py文件在同一目录下
txt = open(filename)
print("Here's your file %r:" %filename)
print(txt.read())  # 读取txt中存在的内容
txt.close()  # 清...]]></description><category></category></item><item><title><![CDATA[笨方法学python 练习13.参数、解包、变量]]></title><link>https://blog.youkuaiyun.com/wangwangwang68/article/details/102976006</link><guid>https://blog.youkuaiyun.com/wangwangwang68/article/details/102976006</guid><author>wangwangwang68</author><pubDate>Fri, 08 Nov 2019 17:03:08 +0800</pubDate><description><![CDATA[先上原文代码
from sys import argv
# argv是参数变量，变量包含我传递给python的参数
yes, I, Love, You = argv  # 随便哪四个变量都行  # 解包过程，将所有参数依次传递给左边变量
more = input('请输入更多参数：')
print("The script is called:",yes)
print("Your first var...]]></description><category></category></item><item><title><![CDATA[笨方法学python练习7.更多打印]]></title><link>https://blog.youkuaiyun.com/wangwangwang68/article/details/102975725</link><guid>https://blog.youkuaiyun.com/wangwangwang68/article/details/102975725</guid><author>wangwangwang68</author><pubDate>Fri, 08 Nov 2019 16:40:44 +0800</pubDate><description><![CDATA[print('Mary had a little lamb.')
print("Its fleece was white as %s." %'snow')  # 若格式化字符串为string类型，则加双引号
print("And everywhere that Mary went.")
print("."*10)

end1 = 'C'
end2 = 'h'
end3 = 'e'
end4 = '...]]></description><category></category></item><item><title><![CDATA[onenote代码高亮操作步骤]]></title><link>https://blog.youkuaiyun.com/wangwangwang68/article/details/102975475</link><guid>https://blog.youkuaiyun.com/wangwangwang68/article/details/102975475</guid><author>wangwangwang68</author><pubDate>Fri, 08 Nov 2019 16:28:16 +0800</pubDate><description><![CDATA[在onenote的“快速访问工具栏中”添加“插入表格”和“底纹”。
将“插入表格”和“底纹”放在工具栏的第三和第四个位置以方便操作。
以pycharm为例，复制代码，粘贴到word中，然后从word中复制刚刚粘贴的代码。
转入onenote界面，快捷键ALT+3调用“插入表格”，行和列均选择“1”，再使用快捷键ALT+4，调用“底纹”命令，改底纹颜色为黑色
粘贴代码至表格中，粘贴方式选怎“合并格...]]></description><category></category></item><item><title><![CDATA[笨方法学python-5 更多的变量和打印]]></title><link>https://blog.youkuaiyun.com/wangwangwang68/article/details/102766374</link><guid>https://blog.youkuaiyun.com/wangwangwang68/article/details/102766374</guid><author>wangwangwang68</author><pubDate>Sun, 27 Oct 2019 14:04:16 +0800</pubDate><description><![CDATA[这一节学习了格式化符号的用法
我理解的格式化符号其实就等同于占位符	
text = " i’m a student "
print (" I said %s " %text)
结果：I said i’m a student
如上述代码，先对text进行赋值，而后利用%s进行代替输入。
但有一点不明白，为何不直接填写：
print(’‘I said’,text )，
其结果是相同的，如果如此，不是多...]]></description><category></category></item><item><title><![CDATA[笨方法学Python-1]]></title><link>https://blog.youkuaiyun.com/wangwangwang68/article/details/102691488</link><guid>https://blog.youkuaiyun.com/wangwangwang68/article/details/102691488</guid><author>wangwangwang68</author><pubDate>Tue, 22 Oct 2019 21:41:17 +0800</pubDate><description><![CDATA[笨方法学Python-1
本人初学python，偶得《笨方法学python-第四版》，惊为天人，到第一个习题时，发现虽然内容很简单，但是卡壳的地方很多，记录下，是以纪念。
1.出现powershell无法识别python的情况，需在电脑系统的环境变量中加入python，具体操作可百度“python如何设置环境变量”。
2.在打完代码之后在powershell运行ex1.py时出现C:\Users\...]]></description><category></category></item></channel></rss>