<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>小白教程 - 零基础Python3入门教程系列1</title>
    <link>https://www.xiaobai27.com/portal.php?mod=list&amp;catid=18</link>
    <description>Latest 20 articles of 零基础Python3入门教程系列1</description>
    <copyright>Copyright(C) 小白教程</copyright>
    <generator>Discuz! Board by Comsenz Inc.</generator>
    <lastBuildDate>Mon, 11 May 2026 12:47:36 +0000</lastBuildDate>
    <ttl>60</ttl>
    <image>
      <url>https://www.xiaobai27.com/static/image/common/logo_88_31.gif</url>
      <title>小白教程</title>
      <link>https://www.xiaobai27.com/</link>
    </image>
    <item>
      <title>Lambda表达式</title>
      <link>https://www.xiaobai27.com/article-189-1.html</link>
      <description><![CDATA[一条lambda语句用于创建新的函数对象。本质上，lambda接受一个参数，后跟一个表达式。Lambda成为函数的主体。该表达式的值由新函数返回。示例（另存为more_lambda.py）：points =  points.sort(key=lambda i: i) pri ... ...]]></description>
      <category>零基础Python3入门教程系列1</category>
      <author>小白教程</author>
      <pubDate>Fri, 14 May 2021 16:46:26 +0000</pubDate>
    </item>
    <item>
      <title>特殊方法</title>
      <link>https://www.xiaobai27.com/article-188-1.html</link>
      <description><![CDATA[有某些方法，例如__init__和__del__方法在类中具有特殊意义。特殊方法用于模仿内置类型的某些行为。例如，如果您想对类使用x索引操作（就像将其用于列表和元组一样），那么您所要做的就是实现该__getitem__()方法， ... ...]]></description>
      <category>零基础Python3入门教程系列1</category>
      <author>小白教程</author>
      <pubDate>Fri, 14 May 2021 16:46:00 +0000</pubDate>
    </item>
    <item>
      <title>logging 模块</title>
      <link>https://www.xiaobai27.com/article-187-1.html</link>
      <description><![CDATA[如果您希望将一些调试消息或重要消息存储在某处，以便可以检查程序是否已按预期运行，该怎么办？您如何将这些消息“存储在某处”？这可以通过使用logging模块来实现。另存为stdlib_logging.py：import os import pla ... ...]]></description>
      <category>零基础Python3入门教程系列1</category>
      <author>小白教程</author>
      <pubDate>Fri, 14 May 2021 16:45:32 +0000</pubDate>
    </item>
    <item>
      <title>sys 模块</title>
      <link>https://www.xiaobai27.com/article-186-1.html</link>
      <description><![CDATA[该sys模块包含特定于系统的功能。我们已经看到该sys.argv列表包含命令行参数。假设我们要检查正在使用的Python软件的版本，该sys模块将向我们提供该信息。 import sys  sys.version_info sys.version_info(major=3,  ... ...]]></description>
      <category>零基础Python3入门教程系列1</category>
      <author>小白教程</author>
      <pubDate>Fri, 14 May 2021 16:45:16 +0000</pubDate>
    </item>
    <item>
      <title>with语句</title>
      <link>https://www.xiaobai27.com/article-185-1.html</link>
      <description><![CDATA[在try块中获取资源，然后在块中释放资源finally是一种常见的模式。因此，还有一条with语句可以使它以干净的方式完成：另存为exceptions_using_with.py：with open(&amp;quot;poem.txt&amp;quot;) as f: for line in f: print(line, end ... ...]]></description>
      <category>零基础Python3入门教程系列1</category>
      <author>小白教程</author>
      <pubDate>Fri, 14 May 2021 16:44:49 +0000</pubDate>
    </item>
    <item>
      <title>引发异常</title>
      <link>https://www.xiaobai27.com/article-184-1.html</link>
      <description><![CDATA[你可以提高使用异常raise提供的错误/异常的名称和异常对象将被声明抛出。您可能引发的错误或异常应该是一个类，该类必须直接或间接地是该类的派生Exception类。示例（另存为exceptions_raise.py）：class ShortInput ... ...]]></description>
      <category>零基础Python3入门教程系列1</category>
      <author>小白教程</author>
      <pubDate>Fri, 14 May 2021 16:44:26 +0000</pubDate>
    </item>
    <item>
      <title>异常情况</title>
      <link>https://www.xiaobai27.com/article-183-1.html</link>
      <description><![CDATA[当程序中出现异常情况时，将发生异常。例如，如果您要读取文件而该文件不存在怎么办？或者，如果您在程序运行时意外删除了该怎么办？此类情况使用异常处理。同样，如果您的程序有一些无效的语句怎么办？这是由Python ... ...]]></description>
      <category>零基础Python3入门教程系列1</category>
      <author>小白教程</author>
      <pubDate>Fri, 14 May 2021 16:44:05 +0000</pubDate>
    </item>
    <item>
      <title>pickle 模块</title>
      <link>https://www.xiaobai27.com/article-182-1.html</link>
      <description><![CDATA[Python提供了一个称为的标准模块pickle，您可以使用该模块将任何普通的Python对象存储在文件中，然后再将其取回。这称为持久存储对象。示例（另存为io_pickle.py）：import pickle  # The name of the file where we ... ...]]></description>
      <category>零基础Python3入门教程系列1</category>
      <author>小白教程</author>
      <pubDate>Fri, 14 May 2021 16:43:38 +0000</pubDate>
    </item>
    <item>
      <title>Python中的输入</title>
      <link>https://www.xiaobai27.com/article-181-1.html</link>
      <description><![CDATA[在某些情况下，您的程序必须与用户进行交互。例如，您希望从用户那里获取输入，然后将一些结果打印回去。我们可以分别使用input()函数和print函数来实现此目的。对于输出，我们还可以使用str（string）类的各种方法  ... ...]]></description>
      <category>零基础Python3入门教程系列1</category>
      <author>小白教程</author>
      <pubDate>Fri, 14 May 2021 16:42:00 +0000</pubDate>
    </item>
    <item>
      <title>重用</title>
      <link>https://www.xiaobai27.com/article-180-1.html</link>
      <description><![CDATA[面向对象编程的主要好处之一是代码的重用，而实现这一目标的方法之一就是通过继承机制。最好将继承想象为在类之间实现类型和子类型关系。假设您要编写一个程序，该程序必须跟踪大学中的老师和学生。它们具有一些共同 ... ...]]></description>
      <category>零基础Python3入门教程系列1</category>
      <author>小白教程</author>
      <pubDate>Fri, 14 May 2021 16:41:39 +0000</pubDate>
    </item>
    <item>
      <title>init  方法</title>
      <link>https://www.xiaobai27.com/article-179-1.html</link>
      <description><![CDATA[在Python类中，有许多方法名称具有特殊的意义。现在，我们将看到该__init__方法的重要性。__init__实例化（即创建）类的对象后，将立即运行该方法。该方法对于执行您想对对象进行的任何初始化（即，将初始值传递给您 ... ...]]></description>
      <category>零基础Python3入门教程系列1</category>
      <author>小白教程</author>
      <pubDate>Fri, 14 May 2021 16:41:06 +0000</pubDate>
    </item>
    <item>
      <title>面向对象编程</title>
      <link>https://www.xiaobai27.com/article-178-1.html</link>
      <description><![CDATA[到目前为止，在我们编写的所有程序中，我们都是围绕函数（即操纵数据的语句块）设计程序的。这称为面向过程的编程方式。组织程序的另一种方法是将数据和功能结合在一起，然后将其包装在称为“对象”的内部。这称为面 ... ...]]></description>
      <category>零基础Python3入门教程系列1</category>
      <author>小白教程</author>
      <pubDate>Fri, 14 May 2021 16:38:00 +0000</pubDate>
    </item>
    <item>
      <title>集合</title>
      <link>https://www.xiaobai27.com/article-177-1.html</link>
      <description><![CDATA[使用集合，您可以测试成员资格，是否是另一个集合的子集，找到两个集合之间的交集，依此类推。 bri = set()  \'india\' in bri True  \'usa\' in bri False  bric = bri.copy()  bric.add(\'china\')  bric.issuperset(bri ...]]></description>
      <category>零基础Python3入门教程系列1</category>
      <author>小白教程</author>
      <pubDate>Fri, 14 May 2021 16:37:28 +0000</pubDate>
    </item>
    <item>
      <title>序列</title>
      <link>https://www.xiaobai27.com/article-176-1.html</link>
      <description><![CDATA[列表，元组和字符串是序列的示例，但是什么是序列，它们的特殊之处是什么？主要功能是成员资格测试（即in和not in表达式）和索引操作，这些功能使我们可以直接获取序列中的特定项目。上面提到的三种类型的序列-列表 ... ...]]></description>
      <category>零基础Python3入门教程系列1</category>
      <author>小白教程</author>
      <pubDate>Fri, 14 May 2021 16:36:59 +0000</pubDate>
    </item>
    <item>
      <title>字典</title>
      <link>https://www.xiaobai27.com/article-175-1.html</link>
      <description><![CDATA[字典就像地址簿，您可以在其中仅通过知道一个人的姓名来查找其地址或联系方式，即我们将键（名称）与值（详细信息）相关联。请注意，密钥必须是唯一的，就像如果您有两个名字完全相同的人一样，您将找不到正确的信息 ... ...]]></description>
      <category>零基础Python3入门教程系列1</category>
      <author>小白教程</author>
      <pubDate>Fri, 14 May 2021 16:36:39 +0000</pubDate>
    </item>
    <item>
      <title>元组</title>
      <link>https://www.xiaobai27.com/article-174-1.html</link>
      <description><![CDATA[元组用于将多个对象保持在一起。可以将它们视为类似于列表，但是没有列表类为您提供的广泛功能。元组的一个主要特征是它们像字符串一样是不可变的，即您不能修改元组。通过在可选的一对括号内指定用逗号分隔的项目来 ... ...]]></description>
      <category>零基础Python3入门教程系列1</category>
      <author>小白教程</author>
      <pubDate>Fri, 14 May 2021 16:36:23 +0000</pubDate>
    </item>
    <item>
      <title>列表</title>
      <link>https://www.xiaobai27.com/article-173-1.html</link>
      <description><![CDATA[list是一种数据结构，其中包含项目的有序集合，即，您可以在列表中存储一系列项目。如果您能想到一个购物清单，其中有要购买的商品清单，这很容易想象，只是您可能会在购物清单中的每行中都放一个商品，而在Python中 ... ...]]></description>
      <category>零基础Python3入门教程系列1</category>
      <author>小白教程</author>
      <pubDate>Fri, 14 May 2021 16:36:10 +0000</pubDate>
    </item>
    <item>
      <title>dir()函数</title>
      <link>https://www.xiaobai27.com/article-172-1.html</link>
      <description><![CDATA[内置dir()函数返回由对象定义的名称列表。如果对象是模块，则此列表包括在该模块内部定义的函数，类和变量。该函数可以接受参数。如果参数是模块的名称，则该函数返回该指定模块的名称列表。如果没有参数，该函数将 ... ...]]></description>
      <category>零基础Python3入门教程系列1</category>
      <author>小白教程</author>
      <pubDate>Fri, 14 May 2021 16:34:33 +0000</pubDate>
    </item>
    <item>
      <title>制作自己的模块</title>
      <link>https://www.xiaobai27.com/article-171-1.html</link>
      <description><![CDATA[创建自己的模块很容易，您一直都在做！这是因为每个Python程序也是一个模块。您只需要确保它具有.py扩展名即可。下面的例子应该清楚。示例（另存为mymodule.py）：def say_hi(): print(\'Hi, this is mymodule speaki ... ...]]></description>
      <category>零基础Python3入门教程系列1</category>
      <author>小白教程</author>
      <pubDate>Fri, 14 May 2021 16:34:10 +0000</pubDate>
    </item>
    <item>
      <title>from..import语句</title>
      <link>https://www.xiaobai27.com/article-170-1.html</link>
      <description><![CDATA[如果要将argv变量直接导入程序中（以避免sys.每次都键入变量），则可以使用该from sys import argv语句。警告：通常，避免使用该from..import语句，而应使用该import语句。这是因为您的程序将避免名称冲突，并且更具 ... ...]]></description>
      <category>零基础Python3入门教程系列1</category>
      <author>小白教程</author>
      <pubDate>Fri, 14 May 2021 16:33:49 +0000</pubDate>
    </item>
  </channel>
</rss>