<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>Leejian - 学习笔记</title>
    <link>http://www.leejian.cn/forum.php?mod=forumdisplay&amp;fid=43</link>
    <description>Latest 20 threads of 学习笔记</description>
    <copyright>Copyright(C) Leejian</copyright>
    <generator>Discuz! Board by Comsenz Inc.</generator>
    <lastBuildDate>Mon, 22 Jun 2026 16:24:24 +0000</lastBuildDate>
    <ttl>60</ttl>
    <image>
      <url>http://www.leejian.cn/static/image/common/logo_88_31.gif</url>
      <title>Leejian</title>
      <link>http://www.leejian.cn/</link>
    </image>
    <item>
      <title>python中将列表内容写入txt文档</title>
      <link>http://www.leejian.cn/forum.php?mod=viewthread&amp;tid=54</link>
      <description><![CDATA[1）打开：f = open(\'1.txt\',\'r\')

#w 只能操作写入 r 只能读取 a 向文件追加

#w+ 可读可写 r+可读可写 a+可读可追加

#wb+写入进制数据

#w模式打开文件，如果而文件中有数据，再次写入内容，会把原来的覆盖掉

2）读取：

        1、read(int)：读取文件内容。如果指 ...]]></description>
      <category>学习笔记</category>
      <author>kongmeng</author>
      <pubDate>Wed, 07 Dec 2022 12:24:43 +0000</pubDate>
    </item>
    <item>
      <title>Pthon 定义函数</title>
      <link>http://www.leejian.cn/forum.php?mod=viewthread&amp;tid=6</link>
      <description><![CDATA[def sayhello():
      print(“hello world”)

def max(a,b):
     if a&gt;b:
         return a
     else:
         return b

sayHello()
print(max(2,3))


==============================
运行效果：

Hello world  //def sayhello 函数
3  //def max 函数

 .]]></description>
      <category>学习笔记</category>
      <author>kongmeng</author>
      <pubDate>Mon, 26 Jun 2017 03:20:45 +0000</pubDate>
    </item>
  </channel>
</rss>