<?xml version="1.0" encoding="utf-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><title>薯条老师的博客-Python入门教程,广州线下小班周末班培训</title><link>https://chipscoco.com/</link><description></description><item><title>1.7节: 面向对象</title><link>https://chipscoco.com/?id=386</link><description>&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.7.1 先理解面向过程&lt;/h1&gt;&lt;p style=&quot;margin-top: 0px; margin-bottom: 1.4em; white-space: pre-wrap; color: rgb(26, 26, 26); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-family: 微软雅黑, 宋体, Arial, Helvetica, sans-serif;&quot;&gt;将一个问题分解为多个步骤，多个子问题，再逐步骤，逐问题地求解，此即面向过程。在开发软件系统时，可将复杂的问题进行分解，再将每个求解的步骤封装为函数，最后再按顺序调用。比如实现一个在线购物系统，将系统拆分为查看商品，添加商品，订单结算的这三个函数，将其按顺序实现,调用，即可实现一个简单的购物系统。&lt;strong&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; text-wrap-mode: wrap; background-color: #FFFFFF;&quot;&gt;薯条老师的高级爬虫+安卓逆向培训正在火热招生中，包拿Offer, 详情请点击&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; text-wrap-mode: wrap; background-color: #FFFFFF;&quot;&gt;：&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=367&quot; target=&quot;_self&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; text-wrap-mode: wrap; background-color: rgb(255, 255, 255);&quot;&gt;https://chipscoco.com/?id=367&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.7.2 再理解面向对象&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;面向对象是指对某一类事物进行描述，概括，然后以计算机中的编程语言进行建模，将生活中的一切事物对象化。 面向对象的核心是抽象。抽象即概括和归类，这里的概括是对共性的概括。&lt;/span&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;抽象后的数据类型就叫做类，类由类属性和类方法组成。类属性表示该数据类型共有的特征，而类方法表示共有的行为。对类进行实例化，可以获得一个具体的对象，实例化后的对象共享类的属性与方法。&lt;/span&gt;&lt;/p&gt;&lt;blockquote style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;比如将矩形抽象为一种数据类型，所有矩形都有四条边，所有矩形都可以计算面积，周长等，此即矩形的共性。概括共性即抽象思维。&lt;/span&gt;&lt;/blockquote&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.7.3 面向对象的三大特征&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; white-space-collapse: preserve;&quot;&gt;面向对象的三大特征: 封装，继承，多态。封装是将实现细节隐藏起来，继承主要是为了实现代码的复用，而多态表示同一事物的不同行为。进一步学习面向对象，可参考薯条老师的Python基础教程&lt;a href=&quot;https://chipscoco.com/?cate=2&quot; target=&quot;_self&quot;&gt;: https://chipscoco.com/?cate=2&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.7.4 类属性，类方法，静态方法&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;white-space-collapse: preserve; color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;在Python中使用class关键字定义类，以下为定义类的基本语法:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;white-space-collapse: preserve; color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;class&amp;nbsp;ClassName:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pass&lt;/pre&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px; white-space-collapse: preserve; color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif;&quot;&gt;ClassName表示类名，在Python中使用大驼峰命名法来给类命名。类名冒号下面的叫做类体，在类体中以定义变量的形式添加类属性:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px; white-space-collapse: preserve; color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;class&amp;nbsp;Rectangle:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sides&amp;nbsp;=&amp;nbsp;4&lt;/pre&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; white-space-collapse: preserve;&quot;&gt;在以上代码中，定义了一个名为Rectangle的类。该类有一个类属性sides, sides的值为4，表示矩形都有四条边。当需要在类中访问类属性时，需要定义类方法：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px; white-space-collapse: preserve; color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;class&amp;nbsp;Rectanle:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sides&amp;nbsp;=&amp;nbsp;4
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;需在方法前写上一行@classmethod的装饰器&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@classmethod
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;def&amp;nbsp;get_sides(cls):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;cls.sides&lt;/pre&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;在以上代码中，给Rectangle类添加了一个叫做get_sides的类方法。读者需注意，类方法至少需要声明一个形参，该形参通常命名为cls, 我们在调用类方法时，无需显式传递第一个形参所对应的实参，Python会自动将第一个参数绑定为类。&lt;/span&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;除了类方法，Python还提供了静态方法，静态方法也是全局的，为所有对象共有：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;class&amp;nbsp;Rectangle:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sides&amp;nbsp;=&amp;nbsp;4
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@classmethod
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;def&amp;nbsp;get_sides(cls):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;cls.sides
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;需在方法前写上一行@classmethod的装饰器&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@staticmethod
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;def&amp;nbsp;calc_perimeter(width,&amp;nbsp;height):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;(width&amp;nbsp;+&amp;nbsp;height)&amp;nbsp;*&amp;nbsp;2&lt;/pre&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.7.5 构造函数，对象属性，对象方法&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;Editable-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;bdvlr&quot; data-offset-key=&quot;eejm-0-0&quot; style=&quot;white-space: pre-wrap; box-sizing: border-box; margin: 0px 0px 1.4em; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(26, 26, 26); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);&quot;&gt;&lt;div data-offset-key=&quot;eejm-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); max-width: 100%;&quot;&gt;&lt;span data-offset-key=&quot;eejm-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px;&quot;&gt;在对类进行实例化时，如果没有定义构造函数，那么Python会自动调用一个默认的无参构造函数来进行实例化。对类进行实例化以后，可获得一个构造好的对象。以下所示为&lt;/span&gt;构造函数的基本语法：&lt;/div&gt;&lt;/div&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span data-offset-key=&quot;7k0pv-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;Editable-unstyled&quot; data-block=&quot;true&quot; data-editor=&quot;bdvlr&quot; data-offset-key=&quot;10mcu-0-0&quot; style=&quot;white-space: pre-wrap; box-sizing: border-box; margin: 0px 0px 1.4em; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(26, 26, 26); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);&quot;&gt;&lt;div data-offset-key=&quot;10mcu-0-0&quot; class=&quot;public-DraftStyleDefault-block public-DraftStyleDefault-ltr&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); max-width: 100%;&quot;&gt;&lt;div class=&quot;prism-show-language&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: relative;&quot;&gt;&lt;div class=&quot;prism-show-language-label&quot; data-language=&quot;Python&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0.5em; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: black; background-color: rgb(207, 207, 207); display: inline-block; position: absolute; inset: 0px 0px auto auto; width: auto; height: auto; font-size: 0.9em; border-radius: 0px 0px 0px 5px; text-shadow: none; z-index: 1; box-shadow: none; transform: none;&quot;&gt;Python&lt;/div&gt;&lt;/div&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;class&amp;nbsp;ClassName:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;def&amp;nbsp;__init__(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pass&lt;/pre&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;类体中的__init__函数即为构造函数，参数self表示实例化后的对象。构造函数的主要作用是初始化对象，并给实例化后的对象添加对象属性：&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;class&amp;nbsp;Rectangle:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;def&amp;nbsp;__init__(self,&amp;nbsp;width,&amp;nbsp;height):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self.width&amp;nbsp;=&amp;nbsp;width
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self.height&amp;nbsp;=&amp;nbsp;height&lt;/pre&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;在以上代码中，我们定义了一个名为Rectangle的类，在该类的构造函数中，一共包括两个形参，分别是width与height。在构造函数中，通过self给实例化后的对象添加了width和height的对象属性。如需操作对象属性，可再定义相关的对象方法：&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;class&amp;nbsp;Rectangle:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;def&amp;nbsp;__init__(self,&amp;nbsp;width,&amp;nbsp;height):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self.width&amp;nbsp;=&amp;nbsp;width
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self.height&amp;nbsp;=&amp;nbsp;height
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;def&amp;nbsp;get_width(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;self.width&lt;/pre&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;在以上代码中，定义了一个名为get_width的对象方法，该方法返回了对象的width属性的值。读者需注意，对于对象方法，至少需要定义一个形参，通常将其命名为self, 该参数无需传递，Python会自动绑定为实例化后的对象。进一步学习Python中的面向对象，可参考薯条老师写的Python基础教程：&lt;a href=&quot;https://chipscoco.com/?cate=2&quot; target=&quot;_self&quot;&gt;https://chipscoco.com/?cate=2&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.7.6 最具实力的小班培训&lt;/h1&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&lt;strong style=&quot;font-size: 16px; background-color: rgb(255, 255, 255); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; box-sizing: border-box;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; text-wrap: wrap; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; text-wrap: wrap; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;薯条老师在广州有开设线下培训班，小班授课模式，一班最多6个人。也可一对一授课，全程帮助你学好计算机，实现高薪就业。不在广州的同学可提供住宿，也可以报名线上小班，用腾讯会议上直播课。&lt;/strong&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/p&gt;&lt;pre data-offset-key=&quot;2r2a2-0-0&quot; style=&quot;box-sizing: border-box; margin-top: 15px; margin-bottom: 15px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(1) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=13&quot; target=&quot;_self&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;Python后端工程师高薪就业班，月薪11K-18K，免费领取课程大纲&lt;/span&gt;&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(2) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=367&quot; target=&quot;_self&quot; textvalue=&quot;Python中高级爬虫逆向工程师就业班，月薪15K-25K，包拿Offer&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;Python中高级爬虫逆向工程师就业班，月薪15K-25K，包拿Offer&lt;/span&gt;&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(3) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=368&quot; target=&quot;_self&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;Python数据分析+商业分析+数据科学就业班，企业级项目实战，月薪10K-20K&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(4) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=369&quot; target=&quot;_self&quot; textvalue=&quot;Python量化交易就业班，A股+期货+数字货币量化，月薪10K-40K(5) 机器学习+深度学习算法工程师就业班，月薪20K-50K&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;Python量化交易就业班，A股+期货+数字货币量化，月薪10K-40K&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(5) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=370&quot; target=&quot;_self&quot; textvalue=&quot;(5) Python机器学习+深度学习算法工程师，月薪20-50K&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;Python机器学习+深度学习算法工程师，月薪20-50K&lt;/span&gt;&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/pre&gt;&lt;div data-block=&quot;true&quot; data-editor=&quot;ddjuk&quot; data-offset-key=&quot;9s3lb-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 1.4em; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); white-space: pre-wrap; color: rgb(26, 26, 26); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); max-width: 100%;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 24px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;跟薯条老师学习的学生有拿到&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;花生日记，林氏家居，南方电网，中国邮政集团，京东, 阿里&lt;/strong&gt;&lt;/strong&gt;等公司的offer, 学生的最低薪资有6K，最高薪资有18K， 平均就业薪资有11000。&lt;/span&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://chipscoco.com/zb_users/upload/1713257765390.jpg&quot; width=&quot;1101&quot; height=&quot;200&quot; style=&quot;font-size: 14px; box-sizing: border-box; max-width: 100%; height: 200px; width: 1101px; border: 0px; line-height: 1; vertical-align: middle; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;&lt;strong style=&quot;font-size: 24px; font-family: 微软雅黑, 宋体, Arial, Helvetica, sans-serif; box-sizing: border-box;&quot;&gt;扫码咨询薯条老师：&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;&lt;p&gt;&lt;img src=&quot;https://chipscoco.com/zb_users/upload/2022/08/202208101660124213867136.jpg&quot; title=&quot;扫码领学习资料.jpg&quot; alt=&quot;扫码领学习资料.jpg&quot;/&gt;&lt;/p&gt;</description><pubDate>Wed, 19 Jun 2024 09:19:11 +0800</pubDate></item><item><title>1.6节: 函数基础</title><link>https://chipscoco.com/?id=385</link><description>&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.6.1 理解函数&lt;/h1&gt;&lt;p style=&quot;margin-top: 0px; margin-bottom: 1.4em; white-space: pre-wrap; color: rgb(26, 26, 26); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-family: 微软雅黑, 宋体, Arial, Helvetica, sans-serif;&quot;&gt;函数是输入到输出的转换器。比如语言翻译器就是一种函数，将中文翻译为英文。这里的中文是语言翻译函数的输入，英文是函数的输出。在Python中，函数也是一种数据类型，通过type可获得函数的类型。读者需注意，在程序设计的过程中，主要是利用函数来实现代码的复用。将具有重复逻辑的代码，封装为一个个函数，当下次需要复用时，直接调用即可。&lt;strong&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; text-wrap-mode: wrap; background-color: #FFFFFF;&quot;&gt;薯条老师的高级爬虫+安卓逆向培训正在火热招生中，包拿Offer, 详情请点击&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; text-wrap-mode: wrap; background-color: #FFFFFF;&quot;&gt;：&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=367&quot; target=&quot;_self&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; text-wrap-mode: wrap; background-color: rgb(255, 255, 255);&quot;&gt;https://chipscoco.com/?id=367&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.6.2 定义函数&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; white-space-collapse: preserve;&quot;&gt;在Python中使用def关键字来定义函数，以下所示为Python函数定义的语法：&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;def&amp;nbsp;function_name(parameter_list):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;code&amp;nbsp;here
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;expression_list&lt;/pre&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;function_name表示函数名，在Python中一般使用下划线命名法来命名。parameter_list表示形参列表，形参即占位符，表示在当前这个位置需要传递参数。冒号下面的为函数体，在函数体中通过return将表达式的值返回给函数的调用方。以下为一个简单的函数实例, 定义一个计算三个数的最大值的函数:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;def&amp;nbsp;calc_max(x,&amp;nbsp;y,&amp;nbsp;z):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;&amp;quot;&amp;quot;&amp;nbsp;计算x,y,z中的最大值&amp;nbsp;&amp;quot;&amp;quot;&amp;quot;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;x&amp;nbsp;if&amp;nbsp;x&amp;nbsp;&amp;gt;&amp;nbsp;y&amp;nbsp;&amp;gt;&amp;nbsp;z&amp;nbsp;or&amp;nbsp;x&amp;nbsp;&amp;gt;&amp;nbsp;z&amp;nbsp;&amp;gt;&amp;nbsp;y&amp;nbsp;else&amp;nbsp;y&amp;nbsp;if&amp;nbsp;y&amp;nbsp;&amp;gt;&amp;nbsp;z&amp;nbsp;else&amp;nbsp;z&lt;/pre&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.6.3 调用函数&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 16px; white-space-collapse: preserve;&quot;&gt;通过调用操作符()来调用函数，需在()中传递实参。以下为函数调用的代码实例：&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; white-space-collapse: preserve;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;def&amp;nbsp;calc_max(x,&amp;nbsp;y,&amp;nbsp;z):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;&amp;quot;&amp;quot;&amp;nbsp;计算x,y,z中的最大值&amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;x&amp;nbsp;if&amp;nbsp;x&amp;nbsp;&amp;gt;&amp;nbsp;y&amp;nbsp;&amp;gt;&amp;nbsp;z&amp;nbsp;else&amp;nbsp;y&amp;nbsp;if&amp;nbsp;y&amp;nbsp;&amp;gt;&amp;nbsp;z&amp;nbsp;else&amp;nbsp;z

#&amp;nbsp;调用calc_max函数
value&amp;nbsp;=&amp;nbsp;calc_max(5,&amp;nbsp;6,&amp;nbsp;7)&amp;nbsp;
print(value)&lt;/pre&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.6.4 位置实参&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;white-space-collapse: preserve; color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;位置实参是指调用函数时按从左到右的顺序来传递实参：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;white-space-collapse: preserve; color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;def&amp;nbsp;calc_max(x,&amp;nbsp;y,&amp;nbsp;z):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;&amp;quot;&amp;quot;&amp;nbsp;计算x,y,z中的最大值&amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;x&amp;nbsp;if&amp;nbsp;x&amp;nbsp;&amp;gt;&amp;nbsp;y&amp;nbsp;&amp;gt;&amp;nbsp;z&amp;nbsp;else&amp;nbsp;y&amp;nbsp;if&amp;nbsp;y&amp;nbsp;&amp;gt;&amp;nbsp;z&amp;nbsp;else&amp;nbsp;z


a,&amp;nbsp;b,&amp;nbsp;c&amp;nbsp;=&amp;nbsp;1,&amp;nbsp;3,&amp;nbsp;5
value&amp;nbsp;=&amp;nbsp;calc_max(a,&amp;nbsp;b,&amp;nbsp;c)&lt;/pre&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;在以上代码中，实参a对应的是形参x, 实参b对应的是形参y, 实参c对应的是形参z, 像这种参数传递方式，叫做位置实参。以位置实参来传递参数时，形参必须与实参一一对应，否则会报错：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;def&amp;nbsp;calc_max(x,&amp;nbsp;y,&amp;nbsp;z):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;&amp;quot;&amp;quot;&amp;nbsp;计算x,y,z中的最大值&amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;x&amp;nbsp;if&amp;nbsp;x&amp;nbsp;&amp;gt;&amp;nbsp;y&amp;nbsp;&amp;gt;&amp;nbsp;z&amp;nbsp;else&amp;nbsp;y&amp;nbsp;if&amp;nbsp;y&amp;nbsp;&amp;gt;&amp;nbsp;z&amp;nbsp;else&amp;nbsp;z


a,&amp;nbsp;b&amp;nbsp;=&amp;nbsp;1,&amp;nbsp;3
#&amp;nbsp;函数一共有3个形参，Python执行以下代码时会抛出异常
value&amp;nbsp;=&amp;nbsp;calc_max(a,&amp;nbsp;b)&lt;/pre&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.6.5 关键字实参&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;white-space-collapse: preserve; color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;关键字实参是调用函数时以name=value的键值对形式来传递，这里的name为形参名，value为实参值。在传递关键字实参时，无需按照从左到右的位置来对应形参：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;white-space-collapse: preserve; color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;def&amp;nbsp;calc_max(x,&amp;nbsp;y,&amp;nbsp;z):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;&amp;quot;&amp;quot;&amp;nbsp;计算x,y,z中的最大值&amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;x&amp;nbsp;if&amp;nbsp;x&amp;nbsp;&amp;gt;&amp;nbsp;y&amp;nbsp;&amp;gt;&amp;nbsp;z&amp;nbsp;else&amp;nbsp;y&amp;nbsp;if&amp;nbsp;y&amp;nbsp;&amp;gt;&amp;nbsp;z&amp;nbsp;else&amp;nbsp;z


a,&amp;nbsp;b,&amp;nbsp;c&amp;nbsp;=&amp;nbsp;1,&amp;nbsp;3,&amp;nbsp;5
#&amp;nbsp;以关键字实参的方式来调用，将实参a传递给形参x,&amp;nbsp;将实参b传递给形参z,&amp;nbsp;将实参传递给形参y
value&amp;nbsp;=&amp;nbsp;calc_max(x=a,&amp;nbsp;z=b,&amp;nbsp;y=c)&lt;/pre&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.6.6 最具实力的小班培训&lt;/h1&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&lt;strong style=&quot;font-size: 16px; background-color: rgb(255, 255, 255); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; box-sizing: border-box;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; text-wrap: wrap; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; text-wrap: wrap; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;薯条老师在广州有开设线下培训班，小班授课模式，一班最多6个人。也可一对一授课，全程帮助你学好计算机，实现高薪就业。不在广州的同学可提供住宿，也可以报名线上小班，用腾讯会议上直播课。&lt;/strong&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/p&gt;&lt;pre data-offset-key=&quot;2r2a2-0-0&quot; style=&quot;box-sizing: border-box; margin-top: 15px; margin-bottom: 15px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(1) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=13&quot; target=&quot;_self&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;Python后端工程师高薪就业班，月薪11K-18K，免费领取课程大纲&lt;/span&gt;&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(2) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=367&quot; target=&quot;_self&quot; textvalue=&quot;Python中高级爬虫逆向工程师就业班，月薪15K-25K，包拿Offer&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;Python中高级爬虫逆向工程师就业班，月薪15K-25K，包拿Offer&lt;/span&gt;&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(3) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=368&quot; target=&quot;_self&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;Python数据分析+商业分析+数据科学就业班，企业级项目实战，月薪10K-20K&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(4) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=369&quot; target=&quot;_self&quot; textvalue=&quot;Python量化交易就业班，A股+期货+数字货币量化，月薪10K-40K(5) 机器学习+深度学习算法工程师就业班，月薪20K-50K&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;Python量化交易就业班，A股+期货+数字货币量化，月薪10K-40K&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(5) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=370&quot; target=&quot;_self&quot; textvalue=&quot;(5) Python机器学习+深度学习算法工程师，月薪20-50K&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;Python机器学习+深度学习算法工程师，月薪20-50K&lt;/span&gt;&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/pre&gt;&lt;div data-block=&quot;true&quot; data-editor=&quot;ddjuk&quot; data-offset-key=&quot;9s3lb-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 1.4em; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); white-space: pre-wrap; color: rgb(26, 26, 26); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); max-width: 100%;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 24px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;跟薯条老师学习的学生有拿到&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;花生日记，林氏家居，南方电网，中国邮政集团，京东, 阿里&lt;/strong&gt;&lt;/strong&gt;等公司的offer, 学生的最低薪资有6K，最高薪资有18K， 平均就业薪资有11000。&lt;/span&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://chipscoco.com/zb_users/upload/1713257765390.jpg&quot; width=&quot;1101&quot; height=&quot;200&quot; style=&quot;font-size: 14px; box-sizing: border-box; max-width: 100%; height: 200px; width: 1101px; border: 0px; line-height: 1; vertical-align: middle; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;&lt;strong style=&quot;font-size: 24px; font-family: 微软雅黑, 宋体, Arial, Helvetica, sans-serif; box-sizing: border-box;&quot;&gt;扫码咨询薯条老师：&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;&lt;p&gt;&lt;img src=&quot;https://chipscoco.com/zb_users/upload/2022/08/202208101660124213867136.jpg&quot; title=&quot;扫码领学习资料.jpg&quot; alt=&quot;扫码领学习资料.jpg&quot;/&gt;&lt;/p&gt;</description><pubDate>Wed, 19 Jun 2024 09:18:10 +0800</pubDate></item><item><title>1.5节: 控制结构</title><link>https://chipscoco.com/?id=384</link><description>&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.5.1 Python中的控制结构&lt;/h1&gt;&lt;p style=&quot;margin-top: 0px; margin-bottom: 1.4em; white-space: pre-wrap; color: rgb(26, 26, 26); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);&quot;&gt;Python中的控制结构主要有条件控制，循环控制，跳转控制。条件控制即当条件成立时执行某种操作，循环控制用来重复执行程序中的代码，而跳转控制用来控制程序流程的跳转。&lt;strong style=&quot;box-sizing: border-box; color: rgb(26, 26, 26); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; color: #333333; font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: #FFFFFF;&quot;&gt;薯条老师的高级爬虫+安卓逆向培训正在火热招生中，包拿Offer, 详情请点击&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px; white-space: pre-wrap; background-color: #FFFFFF; color: #333333; font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;：&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=367&quot; target=&quot;_self&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px; white-space: pre-wrap; background-color: rgb(255, 255, 255); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;https://chipscoco.com/?id=367&lt;/a&gt;&lt;span style=&quot;color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; white-space: pre-wrap; background-color: #FFFFFF;&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;blockquote style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;有了控制结构，才能实现跟更加复杂的逻辑。如若没有控制结构，那程序中的代码必然是机械的顺序执行，几乎无逻辑可言。&lt;/span&gt;&lt;/blockquote&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.5.2 条件控制&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; white-space-collapse: preserve;&quot;&gt;在Python中使用if-elif-else关键字来实现条件控制。if用来声明条件控制的主干，elif用来声明条件控制的分支，else仅当if与elif中条件皆不成立时才会执行。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; white-space-collapse: preserve; font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;x,&amp;nbsp;y&amp;nbsp;=&amp;nbsp;-1,&amp;nbsp;1
if&amp;nbsp;x&amp;nbsp;*&amp;nbsp;y&amp;nbsp;&amp;gt;&amp;nbsp;0:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print(&amp;quot;x与y同号&amp;quot;)
elif&amp;nbsp;x&amp;nbsp;*&amp;nbsp;y&amp;nbsp;&amp;lt;&amp;nbsp;0:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print(&amp;quot;x与y异号&amp;quot;)
else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print(&amp;quot;x与y至少有一个为0&amp;quot;)&lt;/pre&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;条件控制中有且仅有一个if, 有0个或多个elif, 最多一个else。当elif与else同时存在时，else必须位于elif后面：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;import&amp;nbsp;random
#&amp;nbsp;构造一个[0,&amp;nbsp;10]之间的随机数
x&amp;nbsp;=&amp;nbsp;random.randint(0，&amp;nbsp;10)
if&amp;nbsp;x&amp;nbsp;&amp;lt;&amp;nbsp;3:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print(&amp;quot;x&amp;nbsp;&amp;lt;&amp;nbsp;3&amp;quot;)
elif&amp;nbsp;x&amp;nbsp;&amp;lt;&amp;nbsp;5:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print(&amp;quot;3&amp;lt;=&amp;nbsp;x&amp;nbsp;&amp;lt;&amp;nbsp;5&amp;quot;)
elif&amp;nbsp;x&amp;nbsp;&amp;lt;&amp;nbsp;8:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print(&amp;quot;3&amp;nbsp;&amp;lt;=x&amp;nbsp;&amp;lt;&amp;nbsp;8&amp;quot;)
else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print(&amp;quot;8&amp;nbsp;&amp;lt;=x&amp;nbsp;&amp;lt;&amp;nbsp;10&amp;quot;)&lt;/pre&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;条件控制中有且仅有一个if, 有0个或多个elif, 最多一个else。当elif与else同时存在时，else必须位于elif后面：&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.5.3 循环控制&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; white-space-collapse: preserve;&quot;&gt;在Python中使用for, while来实现循环控制。for循环主要用来遍历可迭代对象，Python中的字符串，列表，元组，字典，集合皆是可迭代对象：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; white-space-collapse: preserve;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;#&amp;nbsp;(1)&amp;nbsp;迭代列表
numbers&amp;nbsp;=&amp;nbsp;[1,&amp;nbsp;3,&amp;nbsp;5,&amp;nbsp;7,&amp;nbsp;9]
for&amp;nbsp;number&amp;nbsp;in&amp;nbsp;numbers:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print(number)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
#&amp;nbsp;(2)&amp;nbsp;迭代元组
numbers&amp;nbsp;=&amp;nbsp;(1,&amp;nbsp;3,&amp;nbsp;5,&amp;nbsp;7,&amp;nbsp;9)
for&amp;nbsp;number&amp;nbsp;in&amp;nbsp;numbers:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print(number)&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
#&amp;nbsp;(3)&amp;nbsp;迭代字符串
text&amp;nbsp;=&amp;nbsp;&amp;quot;月落玉长河&amp;quot;
for&amp;nbsp;char&amp;nbsp;in&amp;nbsp;text:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print(char)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
#&amp;nbsp;(4)&amp;nbsp;迭代字典
students&amp;nbsp;=&amp;nbsp;{&amp;quot;Lohan&amp;quot;:&amp;nbsp;98,&amp;nbsp;&amp;quot;LoMei&amp;quot;:&amp;nbsp;91,&amp;nbsp;&amp;quot;LoChole&amp;quot;}
for&amp;nbsp;name,&amp;nbsp;score&amp;nbsp;in&amp;nbsp;students.items():
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print(name,&amp;nbsp;score)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
#&amp;nbsp;(5)&amp;nbsp;迭代集合
pets&amp;nbsp;=&amp;nbsp;{&amp;quot;Lohan&amp;quot;,&amp;nbsp;&amp;quot;LoMei&amp;quot;,&amp;nbsp;&amp;quot;LoChole&amp;quot;}
for&amp;nbsp;pet&amp;nbsp;in&amp;nbsp;&amp;nbsp;pets:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print(pet)&lt;/pre&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;当需要在程序中实现有条件的循环控制时，应当使用while循环：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;#&amp;nbsp;实现一个简单的猜数字游戏

import&amp;nbsp;random
#&amp;nbsp;构造一个[0,&amp;nbsp;10**6]之间的随机数
random_number&amp;nbsp;=&amp;nbsp;random.randint(0,&amp;nbsp;10**6)
guess_number&amp;nbsp;=&amp;nbsp;input(&amp;quot;请输入您猜的数:&amp;quot;)

#&amp;nbsp;如果猜的数与随机数不相等，就一直猜
while&amp;nbsp;guess_number&amp;nbsp;!=&amp;nbsp;random_number:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;guess_number&amp;nbsp;&amp;gt;&amp;nbsp;random_number:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print(&amp;quot;猜大了&amp;quot;)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print(&amp;quot;猜小了&amp;quot;)
print(&amp;quot;猜对了&amp;quot;)&lt;/pre&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.5.4 跳转控制&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;white-space-collapse: preserve; color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;在Python中使用break, continue, return关键字来实现跳转控制。Python中的break用来强制退出循环：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;white-space-collapse: preserve; color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;numbers&amp;nbsp;=&amp;nbsp;[1,&amp;nbsp;3,&amp;nbsp;5,&amp;nbsp;7,&amp;nbsp;9,&amp;nbsp;11,&amp;nbsp;13,&amp;nbsp;15]
sum_&amp;nbsp;=&amp;nbsp;0
for&amp;nbsp;number&amp;nbsp;in&amp;nbsp;numbers:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sum_&amp;nbsp;+=&amp;nbsp;number
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;sum_&amp;nbsp;&amp;gt;&amp;nbsp;20:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;如果sum_大于20，就跳出循环
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break&lt;/pre&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;而continue仅用来退出当次循环，会从下一个位置继续迭代，读者一定要掌握break与continue的区别：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;numbers&amp;nbsp;=&amp;nbsp;[1,&amp;nbsp;2,&amp;nbsp;3,&amp;nbsp;4,&amp;nbsp;5,&amp;nbsp;6,&amp;nbsp;7,&amp;nbsp;8,&amp;nbsp;9,&amp;nbsp;10]
sum_&amp;nbsp;=&amp;nbsp;0
for&amp;nbsp;number&amp;nbsp;in&amp;nbsp;numbers:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;number&amp;nbsp;%&amp;nbsp;2&amp;nbsp;==&amp;nbsp;0:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;如果number为偶数，就跳出循环的当前这一次，继续从下一个数开始迭代
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;continue
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;sum累加的是所有奇数的和
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sum_&amp;nbsp;+=&amp;nbsp;number&lt;/pre&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;Python中的return用来退出函数并返回值给函数的调用方。关于return, 会在后面的函数一节中详细讲解。进一步学习Python中的控制结构，可参考薯条老师的Pyhon基础教程：&lt;a href=&quot;https://chipscoco.com/?cate=2&quot; target=&quot;_self&quot;&gt;&amp;nbsp;https://chipscoco.com/?cate=2&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.5.5 最具实力的小班培训&lt;/h1&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&lt;strong style=&quot;font-size: 16px; background-color: rgb(255, 255, 255); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; box-sizing: border-box;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; text-wrap: wrap; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; text-wrap-mode: wrap; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;薯条老师在广州有开设线下培训班，小班授课模式，一班最多6个人。也可一对一授课，全程帮助你学好计算机，实现高薪就业。不在广州的同学可提供住宿，也可以报名线上小班，用腾讯会议上直播课。&lt;/strong&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/p&gt;&lt;pre data-offset-key=&quot;2r2a2-0-0&quot; style=&quot;box-sizing: border-box; margin-top: 15px; margin-bottom: 15px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(1) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=13&quot; target=&quot;_self&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;Python后端工程师高薪就业班，月薪11K-18K，免费领取课程大纲&lt;/span&gt;&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(2) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=367&quot; target=&quot;_self&quot; textvalue=&quot;Python中高级爬虫逆向工程师就业班，月薪15K-25K，包拿Offer&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;Python高级爬虫逆向工程师就业班，月薪15K-25K，包拿Offer&lt;/span&gt;&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(3) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=368&quot; target=&quot;_self&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;Python数据分析+商业分析+数据科学就业班，企业级项目实战，月薪10K-20K&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(4) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=369&quot; target=&quot;_self&quot; textvalue=&quot;Python量化交易就业班，A股+期货+数字货币量化，月薪10K-40K(5) 机器学习+深度学习算法工程师就业班，月薪20K-50K&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;Python量化交易就业班，A股+期货+数字货币量化，月薪10K-40K&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(5) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=370&quot; target=&quot;_self&quot; textvalue=&quot;(5) Python机器学习+深度学习算法工程师，月薪20-50K&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;Python机器学习+深度学习算法工程师，月薪20-50K&lt;/span&gt;&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/pre&gt;&lt;div data-block=&quot;true&quot; data-editor=&quot;ddjuk&quot; data-offset-key=&quot;9s3lb-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 1.4em; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); white-space: pre-wrap; color: rgb(26, 26, 26); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); max-width: 100%;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 24px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;&lt;/strong&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;跟薯条老师学习的学生有拿到&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;花生日记，林氏家居，南方电网，中国邮政集团，京东, 阿里&lt;/strong&gt;&lt;/strong&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;等公司的offer, 学生的最低薪资有6K，最高薪资有18K， 平均就业薪资有11000。&lt;/span&gt;&lt;/span&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://chipscoco.com/zb_users/upload/1713257765390.jpg&quot; width=&quot;1101&quot; height=&quot;200&quot; style=&quot;font-size: 14px; box-sizing: border-box; max-width: 100%; height: 200px; width: 1101px; border: 0px; line-height: 1; vertical-align: middle; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;&lt;strong style=&quot;font-size: 24px; font-family: 微软雅黑, 宋体, Arial, Helvetica, sans-serif; box-sizing: border-box;&quot;&gt;扫码咨询薯条老师：&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;&lt;p&gt;&lt;img src=&quot;https://chipscoco.com/zb_users/upload/2022/08/202208101660124213867136.jpg&quot; title=&quot;扫码领学习资料.jpg&quot; alt=&quot;扫码领学习资料.jpg&quot;/&gt;&lt;/p&gt;</description><pubDate>Wed, 19 Jun 2024 09:16:26 +0800</pubDate></item><item><title>1.4节: 数据运算</title><link>https://chipscoco.com/?id=383</link><description>&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.4.1 赋值运算&lt;/h1&gt;&lt;p style=&quot;margin-top: 0px; margin-bottom: 1.4em; white-space: pre-wrap; color: rgb(26, 26, 26); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);&quot;&gt;通过赋值运算符来实现赋值运算。赋值运算符即数学中的&amp;quot;=&amp;quot;，只不过该符号在编程语言中叫做赋值操作符。在Python中通过赋值运算来定义变量。&lt;strong style=&quot;box-sizing: border-box; color: rgb(26, 26, 26); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; color: #333333; font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: #FFFFFF;&quot;&gt;薯条老师的高级爬虫+安卓逆向培训正在火热招生中，包拿Offer, 详情请点击&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px; white-space: pre-wrap; background-color: #FFFFFF; color: #333333; font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;：&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=367&quot; target=&quot;_self&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px; white-space: pre-wrap; background-color: rgb(255, 255, 255); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;https://chipscoco.com/?id=367&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; white-space: pre-wrap; background-color: #FFFFFF;&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;#&amp;nbsp;定义一个布尔类型的变量
is_happy&amp;nbsp;=&amp;nbsp;True&lt;/pre&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.4.2 算术运算&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; white-space-collapse: preserve; font-size: 16px;&quot;&gt;通过+，-，*，/，//, %, **等运算符来实现算术运算。算术运算的返回值为数值：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; white-space-collapse: preserve; font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;a,&amp;nbsp;b&amp;nbsp;=&amp;nbsp;3,&amp;nbsp;2
#&amp;nbsp;(1)&amp;nbsp;加法运算
value&amp;nbsp;=&amp;nbsp;a&amp;nbsp;+&amp;nbsp;b&amp;nbsp;#&amp;nbsp;value的结果为5
#&amp;nbsp;(2)&amp;nbsp;减法运算
value&amp;nbsp;=&amp;nbsp;a&amp;nbsp;-&amp;nbsp;b&amp;nbsp;&amp;nbsp;#&amp;nbsp;value的结果为1
#&amp;nbsp;(3)&amp;nbsp;乘法运算
value&amp;nbsp;=&amp;nbsp;a&amp;nbsp;*&amp;nbsp;b&amp;nbsp;&amp;nbsp;#&amp;nbsp;value的结果为6
#&amp;nbsp;(4)&amp;nbsp;除法运算
value&amp;nbsp;=&amp;nbsp;a&amp;nbsp;/&amp;nbsp;b&amp;nbsp;&amp;nbsp;#&amp;nbsp;value的结果为1.5
#&amp;nbsp;(5)&amp;nbsp;整除运算
value&amp;nbsp;=&amp;nbsp;a&amp;nbsp;//&amp;nbsp;b&amp;nbsp;#&amp;nbsp;value的结果为1
#&amp;nbsp;(6)&amp;nbsp;求余运算
value&amp;nbsp;=&amp;nbsp;a&amp;nbsp;%&amp;nbsp;b&amp;nbsp;#&amp;nbsp;value的结果为1
#&amp;nbsp;(7)&amp;nbsp;幂运算
value&amp;nbsp;=&amp;nbsp;b&amp;nbsp;**&amp;nbsp;2&amp;nbsp;#&amp;nbsp;b的2次幂，value的结果为4&lt;/pre&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;算术运算可与赋值运算构成复合运算：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;a&amp;nbsp;+=&amp;nbsp;b&amp;nbsp;&amp;nbsp;#&amp;nbsp;a为5
#&amp;nbsp;以上代码等价于&amp;nbsp;a&amp;nbsp;=&amp;nbsp;a&amp;nbsp;+b
a&amp;nbsp;//=&amp;nbsp;b&amp;nbsp;&amp;nbsp;#&amp;nbsp;a&amp;nbsp;=&amp;nbsp;a&amp;nbsp;//&amp;nbsp;b&lt;/pre&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.4.3 关系运算&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; white-space-collapse: preserve;&quot;&gt;关系运算即比较大小，在Python中使用&amp;gt;, &amp;lt;, &amp;gt;=, &amp;lt;=, ==来实现关系运算。关系运算的返回值为逻辑上的真或假：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; white-space-collapse: preserve;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;value&amp;nbsp;=&amp;nbsp;1&amp;nbsp;&amp;gt;&amp;nbsp;2&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;value的值为False
value&amp;nbsp;=&amp;nbsp;None&amp;nbsp;==&amp;nbsp;None&amp;nbsp;&amp;nbsp;#&amp;nbsp;value的值为True&lt;/pre&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.4.4 逻辑运算&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;white-space-collapse: preserve; color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;逻辑运算用来测试真或假，在Python中使用and, or, not来实现逻辑运算。and表示逻辑与，当所有值都为真时，结果才为真。or表示逻辑或，只要有一个为真，结果就为真。not表示逻辑非，非真就是假，非假就是真。在Python中常使用逻辑运算符来连接多个布尔表达式：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;white-space-collapse: preserve; color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;default_account&amp;nbsp;=&amp;nbsp;&amp;quot;薯条老师&amp;quot;
default_password&amp;nbsp;=&amp;nbsp;&amp;quot;123456&amp;quot;
account&amp;nbsp;=&amp;nbsp;input(&amp;quot;请输入您的登录账号:&amp;quot;)
passwd&amp;nbsp;=&amp;nbsp;input(&amp;quot;请输入您的登录密码&amp;quot;)
login_status&amp;nbsp;=&amp;nbsp;default_account&amp;nbsp;==&amp;nbsp;account&amp;nbsp;and&amp;nbsp;default_password&amp;nbsp;==&amp;nbsp;password&lt;/pre&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;逻辑运算的短路逻辑：逻辑与遇假触发短路，逻辑或遇真触发短路。读者需注意，在触发短路时，Python会返回最后一个参与运算的操作数:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;love&amp;nbsp;=&amp;nbsp;520&amp;nbsp;and&amp;nbsp;False&amp;nbsp;&amp;nbsp;#&amp;nbsp;False为假，逻辑与运算在该位置触发短路，返回False
love&amp;nbsp;=&amp;nbsp;False&amp;nbsp;or&amp;nbsp;&amp;quot;&amp;quot;&amp;nbsp;or&amp;nbsp;1314&amp;nbsp;or&amp;nbsp;748&amp;nbsp;&amp;nbsp;#&amp;nbsp;False为假，&amp;quot;&amp;quot;为假，1314为真，逻辑或在该位置触发短路，返回1314&lt;/pre&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;读者需注意，在Python中0值，空值都是假值。在以上代码中，False是0值，&amp;quot;&amp;quot;是空值，它们都是假值。1314是非0值，为真。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.4.5 标识运算&lt;/h1&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;Python中的标识运算用来判断标识值是否相等，返回布尔值。在Python中使用is来表示标识运算：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;white-space-collapse: preserve; color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;#&amp;nbsp;Python中的变量储存的是对象的标识值
forever&amp;nbsp;=&amp;nbsp;1314
love&amp;nbsp;=&amp;nbsp;forever
value&amp;nbsp;=&amp;nbsp;love&amp;nbsp;is&amp;nbsp;forever&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;love与forever引用的是同一个对象1314，标识值相等，返回True

#&amp;nbsp;值相等，但标识值不一定相等
left&amp;nbsp;=&amp;nbsp;[1,&amp;nbsp;2,&amp;nbsp;3]
right&amp;nbsp;=&amp;nbsp;[1,&amp;nbsp;2,&amp;nbsp;3]
value&amp;nbsp;=&amp;nbsp;left&amp;nbsp;==&amp;nbsp;right&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;left引用的列表与right引用的列表值相等，返回True
value&amp;nbsp;=&amp;nbsp;left&amp;nbsp;is&amp;nbsp;right&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;left引用的列表与right引用的不是同一个列表，标识值不相等，返回False&lt;/pre&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.4.6 最具实力的小班培训&lt;/h1&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&lt;strong style=&quot;font-size: 16px; background-color: rgb(255, 255, 255); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; box-sizing: border-box;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; text-wrap: wrap; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; text-wrap-mode: wrap; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;薯条老师在广州有开设线下培训班，小班授课模式，一班最多6个人。也可一对一授课，全程帮助你学好计算机，实现高薪就业。不在广州的同学可提供住宿，也可以报名线上小班，用腾讯会议上直播课。&lt;/strong&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/p&gt;&lt;pre data-offset-key=&quot;2r2a2-0-0&quot; style=&quot;box-sizing: border-box; margin-top: 15px; margin-bottom: 15px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(1) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=13&quot; target=&quot;_self&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;Python后端工程师高薪就业班，月薪11K-18K，免费领取课程大纲&lt;/span&gt;&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(2) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=367&quot; target=&quot;_self&quot; textvalue=&quot;Python中高级爬虫逆向工程师就业班，月薪15K-25K，包拿Offer&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;Python高级爬虫逆向工程师就业班，月薪15K-25K，包拿Offer&lt;/span&gt;&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(3) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=368&quot; target=&quot;_self&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;Python数据分析+商业分析+数据科学就业班，企业级项目实战，月薪10K-20K&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(4) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=369&quot; target=&quot;_self&quot; textvalue=&quot;Python量化交易就业班，A股+期货+数字货币量化，月薪10K-40K(5) 机器学习+深度学习算法工程师就业班，月薪20K-50K&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;Python量化交易就业班，A股+期货+数字货币量化，月薪10K-40K&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(5) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=370&quot; target=&quot;_self&quot; textvalue=&quot;(5) Python机器学习+深度学习算法工程师，月薪20-50K&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;Python机器学习+深度学习算法工程师，月薪20-50K&lt;/span&gt;&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/pre&gt;&lt;div data-block=&quot;true&quot; data-editor=&quot;ddjuk&quot; data-offset-key=&quot;9s3lb-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 1.4em; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); white-space: pre-wrap; color: rgb(26, 26, 26); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); max-width: 100%;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 24px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;&lt;/strong&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;跟薯条老师学习的学生有拿到&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;花生日记，林氏家居，南方电网，中国邮政集团，京东, 阿里&lt;/strong&gt;&lt;/strong&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;等公司的offer, 学生的最低薪资有6K，最高薪资有18K， 平均就业薪资有11000。&lt;/span&gt;&lt;/span&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://chipscoco.com/zb_users/upload/1713257765390.jpg&quot; width=&quot;1101&quot; height=&quot;200&quot; style=&quot;font-size: 14px; box-sizing: border-box; max-width: 100%; height: 200px; width: 1101px; border: 0px; line-height: 1; vertical-align: middle; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;&lt;strong style=&quot;font-size: 24px; font-family: 微软雅黑, 宋体, Arial, Helvetica, sans-serif; box-sizing: border-box;&quot;&gt;扫码咨询薯条老师：&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;&lt;p&gt;&lt;img src=&quot;https://chipscoco.com/zb_users/upload/2022/08/202208101660124213867136.jpg&quot; title=&quot;扫码领学习资料.jpg&quot; alt=&quot;扫码领学习资料.jpg&quot;/&gt;&lt;/p&gt;</description><pubDate>Wed, 19 Jun 2024 09:14:30 +0800</pubDate></item><item><title>1.3节: 数据类型</title><link>https://chipscoco.com/?id=382</link><description>&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.3.1 两大数据类型&lt;/h1&gt;&lt;p style=&quot;margin-top: 0px; margin-bottom: 1.4em; white-space: pre-wrap; color: rgb(26, 26, 26); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);&quot;&gt;Python中的数据类型，总的来说，可分为两大类，一类是不可变数据类型，一类是可变数据类型。不可变是指不能对对象本身进行修改，在对其进行添加，修改等操作时，会返回一个新的对象。而可变是指可以对对象本身进行添加，修改，删除等操作。&lt;strong style=&quot;box-sizing: border-box; color: rgb(26, 26, 26); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; color: #333333; font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: #FFFFFF;&quot;&gt;薯条老师的高级爬虫+安卓逆向培训正在火热招生中，包拿Offer, 详情请点击&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px; white-space: pre-wrap; background-color: #FFFFFF; color: #333333; font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;：&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=367&quot; target=&quot;_self&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px; white-space: pre-wrap; background-color: rgb(255, 255, 255); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;https://chipscoco.com/?id=367&lt;/a&gt;&lt;span style=&quot;color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; white-space: pre-wrap; background-color: #FFFFFF;&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;blockquote style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;当需要在程序中表达不可变的语义时，就应当使用不可变类型，比如定义一个表示一年四季的数据类型，一年只有四季，是不可变的。当需要在程序中表达可变的语义时，就应当使用可变类型，比如实现一个购物车。购物车是可变的，需要对购物车进行加购，商品移除等操作。&lt;/span&gt;&lt;/blockquote&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.3.2 不可变数据类型&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; white-space-collapse: preserve;&quot;&gt;Python中的不可变数据类型有整型，浮点型，布尔型，空类型，字符串，元组等。以下是关于这些不可变类型的代码实例:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; white-space-collapse: preserve; font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;#&amp;nbsp;(1)&amp;nbsp;定义一个整型类型的变量age
age&amp;nbsp;=&amp;nbsp;13
#&amp;nbsp;(2)&amp;nbsp;定义一个浮点类型的变量price,&amp;nbsp;浮点型即小数类型，浮点型的类型名是float
price&amp;nbsp;=&amp;nbsp;11.11
#&amp;nbsp;(3)&amp;nbsp;定义一个布尔型的变量is_happy,&amp;nbsp;布尔类型的True表示真值，False表示假值
is_happy&amp;nbsp;=&amp;nbsp;True
#&amp;nbsp;(4)&amp;nbsp;定义一个空类型的变量empty,&amp;nbsp;None值恒为假
empty&amp;nbsp;=&amp;nbsp;None
#&amp;nbsp;定义一个字符串类型的变量poem，&amp;nbsp;在Python中用英文引号括起来的就是字符串
poem&amp;nbsp;=&amp;nbsp;&amp;quot;昔日匣中三尺水，曾与明月斗清霜&amp;quot;
#&amp;nbsp;定义一个元组类型的变量season,&amp;nbsp;在Python中用()括起来的就是元组。元组的()是可以省略的
season&amp;nbsp;=&amp;nbsp;(&amp;quot;春天&amp;quot;，&amp;nbsp;&amp;quot;夏天&amp;quot;,&amp;nbsp;&amp;quot;秋天&amp;quot;,&amp;nbsp;&amp;quot;冬天&amp;quot;)&lt;/pre&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.3.3 可变数据类型&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 16px; white-space-collapse: preserve;&quot;&gt;Python中的可变数据类型有列表，字典，与集合。以下是关于这些可变类型的代码实例：&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 16px; white-space-collapse: preserve;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;#&amp;nbsp;(1)&amp;nbsp;定义一个列表类型的变量,&amp;nbsp;在Python中用[]括起来的即为列表
numbers&amp;nbsp;=&amp;nbsp;[1,&amp;nbsp;3,&amp;nbsp;5,&amp;nbsp;7,&amp;nbsp;9]
#&amp;nbsp;(2)&amp;nbsp;定义一个字典类型的变量，Python中的字典是键值对的集合
#&amp;nbsp;{name:&amp;nbsp;value}
students&amp;nbsp;=&amp;nbsp;{&amp;quot;Lohan&amp;quot;:&amp;nbsp;98,&amp;nbsp;&amp;quot;LoMei&amp;quot;:&amp;nbsp;99,&amp;nbsp;&amp;quot;LoChole&amp;quot;:&amp;nbsp;92}
#&amp;nbsp;(3)&amp;nbsp;定义一个集合类型的变量,&amp;nbsp;Python中的集合仅包含键
pets&amp;nbsp;=&amp;nbsp;{&amp;quot;Lohan&amp;quot;,&amp;nbsp;&amp;quot;LoMei&amp;quot;,&amp;nbsp;&amp;quot;LoChole&amp;quot;}&lt;/pre&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;系统学习Python中的数据类型，可参考薯条老师的&lt;a href=&quot;https://chipscoco.com/?cate=2&quot; target=&quot;_self&quot;&gt;《Python基础教程》&lt;/a&gt;，也可以直接在京东商城购买薯条老师与人民邮电出版社合作出版的《&lt;a href=&quot;https://item.jd.com/13256403.html&quot; target=&quot;_self&quot;&gt;Python从入门到精通》&lt;/a&gt;。&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;1.3.4 最具实力的小班培训&lt;/h1&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&lt;strong style=&quot;font-size: 16px; background-color: rgb(255, 255, 255); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; box-sizing: border-box;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; text-wrap: wrap; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; text-wrap-mode: wrap; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;薯条老师在广州有开设线下培训班，小班授课模式，一班最多6个人。也可一对一授课，全程帮助你学好计算机，实现高薪就业。不在广州的同学可提供住宿，也可以报名线上小班，用腾讯会议上直播课。&lt;/strong&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/p&gt;&lt;pre data-offset-key=&quot;2r2a2-0-0&quot; style=&quot;box-sizing: border-box; margin-top: 15px; margin-bottom: 15px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(1) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=13&quot; target=&quot;_self&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;Python后端工程师高薪就业班，月薪11K-18K，免费领取课程大纲&lt;/span&gt;&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(2) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=367&quot; target=&quot;_self&quot; textvalue=&quot;Python中高级爬虫逆向工程师就业班，月薪15K-25K，包拿Offer&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;Python高级爬虫逆向工程师就业班，月薪15K-25K，包拿Offer&lt;/span&gt;&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(3) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=368&quot; target=&quot;_self&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;Python数据分析+商业分析+数据科学就业班，企业级项目实战，月薪10K-20K&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(4) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=369&quot; target=&quot;_self&quot; textvalue=&quot;Python量化交易就业班，A股+期货+数字货币量化，月薪10K-40K(5) 机器学习+深度学习算法工程师就业班，月薪20K-50K&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;Python量化交易就业班，A股+期货+数字货币量化，月薪10K-40K&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(5) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=370&quot; target=&quot;_self&quot; textvalue=&quot;(5) Python机器学习+深度学习算法工程师，月薪20-50K&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: 0.35s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;Python机器学习+深度学习算法工程师，月薪20-50K&lt;/span&gt;&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/pre&gt;&lt;div data-block=&quot;true&quot; data-editor=&quot;ddjuk&quot; data-offset-key=&quot;9s3lb-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 1.4em; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); white-space: pre-wrap; color: rgb(26, 26, 26); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); max-width: 100%;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 24px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;&lt;/strong&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;跟薯条老师学习的学生有拿到&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;花生日记，林氏家居，南方电网，中国邮政集团，京东, 阿里&lt;/strong&gt;&lt;/strong&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;等公司的offer, 学生的最低薪资有6K，最高薪资有18K， 平均就业薪资有11000。&lt;/span&gt;&lt;/span&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://chipscoco.com/zb_users/upload/1713257765390.jpg&quot; width=&quot;1101&quot; height=&quot;200&quot; style=&quot;font-size: 14px; box-sizing: border-box; max-width: 100%; height: 200px; width: 1101px; border: 0px; line-height: 1; vertical-align: middle; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;&lt;strong style=&quot;font-size: 24px; font-family: 微软雅黑, 宋体, Arial, Helvetica, sans-serif; box-sizing: border-box;&quot;&gt;扫码咨询薯条老师：&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;&lt;p&gt;&lt;img src=&quot;https://chipscoco.com/zb_users/upload/2022/08/202208101660124213867136.jpg&quot; title=&quot;扫码领学习资料.jpg&quot; alt=&quot;扫码领学习资料.jpg&quot;/&gt;&lt;/p&gt;</description><pubDate>Tue, 18 Jun 2024 08:37:57 +0800</pubDate></item><item><title>2.5节: Numpy数组删除</title><link>https://chipscoco.com/?id=381</link><description>&lt;h2 style=&quot;text-wrap: wrap; box-sizing: border-box; margin: 15px 0px; padding: 10px 15px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-weight: 400; border-left: 4px solid rgb(62, 111, 143); background-color: rgb(242, 242, 242); font-size: 20px; border-top-color: rgb(62, 111, 143); border-right-color: rgb(62, 111, 143); border-bottom-color: rgb(62, 111, 143); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;广州番禺Python, Java全职脱产班+周末班精品小班培训&lt;/h2&gt;&lt;blockquote style=&quot;text-wrap: wrap; box-sizing: border-box; border-left: 10px solid rgba(102, 128, 153, 0.075); background-color: rgba(102, 128, 153, 0.05); border-radius: 0px 5px 5px 0px; padding: 15px 20px; margin: 0px 0px 6px; color: rgb(102, 102, 102); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px;&quot;&gt;&lt;p&gt;薯条老师在广州做Python和Java的精品小班培训，一个班最多8个人，学员的就业薪资在10K到18K之间。不在广州的同学可提供住宿，也可以报名线上小班，用腾讯会议直播上课。培训的课程有&lt;strong style=&quot;color: rgb(149, 55, 52);&quot;&gt;Java大数据，&lt;/strong&gt;&lt;span style=&quot;color: #953734;&quot;&gt;&lt;strong&gt;Python中高级爬虫(JS逆向+安卓逆向)，Python数据分析+数据科学+商业分析，A股+期货+数字货币的金融量化交易，机器学习+深度学习算法&lt;/strong&gt;&lt;/span&gt;等。授课详情请点击：&lt;a href=&quot;https://chipscoco.com/?cate=6&quot; target=&quot;_self&quot;&gt;https://chipscoco.com/?cate=6&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;2.5.1 numpy数组的删除操作&lt;/h1&gt;&lt;p style=&quot;margin-top: 0px; margin-bottom: 1.4em; white-space: pre-wrap; color: rgb(26, 26, 26); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-family: 微软雅黑, 宋体, Arial, Helvetica, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;通过下表所示的方法来对数组进行删除操作：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr class=&quot;firstRow&quot;&gt;&lt;th width=&quot;287&quot; style=&quot;border-top-color: rgb(221, 221, 221);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;操作方法&lt;/span&gt;&lt;br/&gt;&lt;/th&gt;&lt;th width=&quot;766&quot; style=&quot;border-top-color: rgb(221, 221, 221);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;描述&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;287&quot; style=&quot;word-break: break-all;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;numpy.delete&lt;/span&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;766&quot; style=&quot;word-break: break-all;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;沿着水平方向或垂直方向删除数组中的元素&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;2.5.2 numpy.delete方法&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;numpy.delete方法用于对数组进行删除操作，以下为函数的主要参数:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;blockquote style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;① arr:&amp;nbsp; 表示源数组&lt;br/&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;② obj: 用来指定删除的索引，可为整数或数组&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;③ axis:&amp;nbsp;为0时沿着纵轴进行操作，为1时则沿着横轴进行操作(仅对于二维数组而言)。&lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;axis实质是用来指定沿着第i维的方向进行操作。如果未提供 axis 值，则输入数组arr会被展&lt;/span&gt;&lt;/p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;代码示例：&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap; font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;arr&amp;nbsp;=&amp;nbsp;np.array([1,&amp;nbsp;2,&amp;nbsp;3,&amp;nbsp;4,&amp;nbsp;5,&amp;nbsp;6])
#&amp;nbsp;axis为0时沿着横轴的方向删除，此时的1表示列索引
sub_arr&amp;nbsp;=&amp;nbsp;np.delete(arr,&amp;nbsp;1,&amp;nbsp;axis=0)
print(sub_arr)


#&amp;nbsp;obj也可以传递类似于数组的对象来批量删除
sub_arr&amp;nbsp;=&amp;nbsp;np.delete(arr,&amp;nbsp;[1,&amp;nbsp;3],&amp;nbsp;axis=0)
print(sub_arr)

arr&amp;nbsp;=&amp;nbsp;arr.reshape(2,&amp;nbsp;3)
print(arr,&amp;nbsp;&amp;quot;\n&amp;quot;+&amp;quot;_&amp;quot;*8+&amp;quot;\n&amp;quot;)
#&amp;nbsp;axis为0时沿着行的方向删除，此时的0表示行索引
sub_arr&amp;nbsp;=&amp;nbsp;np.delete(arr,&amp;nbsp;0,&amp;nbsp;axis=0)
print(sub_arr)


#&amp;nbsp;axis为1时沿着列的方向删除，此时的1表示每一行的列索引
sub_arr&amp;nbsp;=&amp;nbsp;np.delete(arr,&amp;nbsp;0,&amp;nbsp;axis=1)
print(sub_arr)
#&amp;nbsp;也可以通过分片操作来批量删除多个列
sub_arr&amp;nbsp;=&amp;nbsp;np.delete(arr,&amp;nbsp;np.s_[:2],&amp;nbsp;axis=1)
print(sub_arr)&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap; font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;2.5.3 最具实力的小班培训&lt;/h1&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&lt;strong style=&quot;font-size: 16px; background-color: rgb(255, 255, 255); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; box-sizing: border-box;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;div id=&quot;txtbox&quot; class=&quot;tx-text&quot; style=&quot;text-wrap: wrap; box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); line-height: 1.7; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;div id=&quot;txtbox&quot; class=&quot;tx-text&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); line-height: 1.7;&quot;&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;不在广州的同学可提供住宿，也可以报名线上小班，用腾讯会议直播上课&lt;/strong&gt;&lt;span style=&quot;outline: 0px;&quot;&gt;。&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/p&gt;&lt;pre data-offset-key=&quot;2r2a2-0-0&quot; style=&quot;margin-top: 15px; margin-bottom: 15px; padding: 0px; background-color: rgb(255, 255, 255); box-sizing: border-box; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 16px;&quot;&gt;(1) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=13&quot; target=&quot;_self&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: all 0.35s ease 0s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;Python后端工程师高薪就业班，月薪11K-18K，免费领取课程大纲&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 16px;&quot;&gt;(2) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=367&quot; target=&quot;_self&quot; textvalue=&quot;Python中高级爬虫逆向工程师就业班，月薪15K-25K，包拿Offer&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: all 0.35s ease 0s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;Python中高级爬虫逆向工程师就业班，月薪15K-25K，包拿Offer&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 16px;&quot;&gt;(3) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=368&quot; target=&quot;_self&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: all 0.35s ease 0s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;Python数据分析+商业分析+数据科学就业班，企业级项目实战，月薪10K-20K&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 16px;&quot;&gt;(4) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=369&quot; target=&quot;_self&quot; textvalue=&quot;Python量化交易就业班，A股+期货+数字货币量化，月薪10K-40K(5) 机器学习+深度学习算法工程师就业班，月薪20K-50K&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: all 0.35s ease 0s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;Python量化交易就业班，A股+期货+数字货币量化，月薪10K-40K&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 16px;&quot;&gt;(5) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=370&quot; target=&quot;_self&quot; textvalue=&quot;(5) Python机器学习+深度学习算法工程师，月薪20-50K&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: all 0.35s ease 0s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;Python机器学习+深度学习算法工程师，月薪20-50K&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/pre&gt;&lt;div data-block=&quot;true&quot; data-editor=&quot;ddjuk&quot; data-offset-key=&quot;9s3lb-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 1.4em; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); white-space-collapse: preserve; color: rgb(26, 26, 26); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);&quot;&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); max-width: 100%;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 24px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;跟薯条老师学习的学生有拿到&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;花生日记，林氏家居，南方电网，方舟健客,&amp;nbsp; 阿里&lt;/strong&gt;&lt;/strong&gt;等公司的offer, 学生的最低薪资有6K，最高薪资有18K， 平均就业薪资有11000。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 36px;&quot;&gt;&lt;/span&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://chipscoco.com/zb_users/upload/1713257765390.jpg&quot; width=&quot;1101&quot; height=&quot;200&quot; style=&quot;box-sizing: border-box; max-width: 100%; height: 200px; width: 1101px; border: 0px; line-height: 1; vertical-align: middle; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 24px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;扫码咨询薯条老师：&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;&lt;span data-offset-key=&quot;9s3lb-0-2&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px;&quot;&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span data-offset-key=&quot;9s3lb-0-2&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span data-offset-key=&quot;9s3lb-0-2&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px;&quot;&gt;&lt;img src=&quot;https://chipscoco.com/zb_users/upload/2022/08/202208101660124213867136.jpg&quot; title=&quot;扫码领学习资料.jpg&quot; alt=&quot;扫码领学习资料.jpg&quot; style=&quot;box-sizing: border-box; max-width: 100%; border: 0px; line-height: 1; vertical-align: middle; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); height: auto !important; width: auto !important;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;</description><pubDate>Tue, 18 Jun 2024 08:21:37 +0800</pubDate></item><item><title>2.4节: Numpy数组增加</title><link>https://chipscoco.com/?id=380</link><description>&lt;h2 style=&quot;text-wrap: wrap; box-sizing: border-box; margin: 15px 0px; padding: 10px 15px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-weight: 400; border-left: 4px solid rgb(62, 111, 143); background-color: rgb(242, 242, 242); font-size: 20px; border-top-color: rgb(62, 111, 143); border-right-color: rgb(62, 111, 143); border-bottom-color: rgb(62, 111, 143); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;广州番禺Python, Java全职脱产班+周末班精品小班培训&lt;/h2&gt;&lt;blockquote style=&quot;text-wrap: wrap; box-sizing: border-box; border-left: 10px solid rgba(102, 128, 153, 0.075); background-color: rgba(102, 128, 153, 0.05); border-radius: 0px 5px 5px 0px; padding: 15px 20px; margin: 0px 0px 6px; color: rgb(102, 102, 102); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px;&quot;&gt;&lt;p&gt;薯条老师在广州做Python和Java的精品小班培训，一个班最多8个人，学员的就业薪资在10K到18K之间。不在广州的同学可提供住宿，也可以报名线上小班，用腾讯会议直播上课。培训的课程有&lt;strong style=&quot;color: rgb(149, 55, 52);&quot;&gt;Java大数据，&lt;/strong&gt;&lt;span style=&quot;color: #953734;&quot;&gt;&lt;strong&gt;Python中高级爬虫(JS逆向+安卓逆向)，Python数据分析+数据科学+商业分析，A股+期货+数字货币的金融量化交易，机器学习+深度学习算法&lt;/strong&gt;&lt;/span&gt;等。授课详情请点击：&lt;a href=&quot;https://chipscoco.com/?cate=6&quot; target=&quot;_self&quot;&gt;https://chipscoco.com/?cate=6&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;2.4.1 numpy数组的增加操作&lt;/h1&gt;&lt;p style=&quot;margin-top: 0px; margin-bottom: 1.4em; white-space: pre-wrap; color: rgb(26, 26, 26); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-family: 微软雅黑, 宋体, Arial, Helvetica, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;通过下表所示的方法来拼接数组：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr class=&quot;firstRow&quot;&gt;&lt;th width=&quot;287&quot; style=&quot;border-top-color: rgb(221, 221, 221);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;操作方法&lt;/span&gt;&lt;br/&gt;&lt;/th&gt;&lt;th width=&quot;766&quot; style=&quot;border-top-color: rgb(221, 221, 221);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;描述&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;287&quot; style=&quot;word-break: break-all;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;numpy.hstack&lt;/span&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;766&quot; style=&quot;word-break: break-all;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;沿着水平方向拼接数组&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;287&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;numpy.vstack&lt;/span&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;766&quot; style=&quot;word-break: break-all;&quot;&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;沿着垂直方向拼接数组&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;287&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;numpy.append&lt;/span&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;766&quot; style=&quot;word-break: break-all;&quot;&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;在数组末尾添加值或者沿着指定的轴方向添加数组&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;2.4.2 numpy.hstack方法&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;numpy.hstack方法用于在水平方向拼接数组，以下为函数的主要参数:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;blockquote style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;① tup:&amp;nbsp; 元组类型，包含一系列待拼接的数组&lt;/span&gt;&lt;br/&gt;&lt;/blockquote&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;代码示例：&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;#&amp;nbsp;__author__&amp;nbsp;=&amp;nbsp;&amp;quot;薯条老师&amp;quot;

arr1&amp;nbsp;=&amp;nbsp;np.array([1,&amp;nbsp;2,&amp;nbsp;3,&amp;nbsp;4])
arr2&amp;nbsp;=&amp;nbsp;np.array([5,&amp;nbsp;6,&amp;nbsp;7,&amp;nbsp;8])

#&amp;nbsp;将两个一维的数组沿着横轴方向来拼接
arr3&amp;nbsp;=&amp;nbsp;np.hstack((arr1,&amp;nbsp;arr2))
print(arr3)
&amp;quot;&amp;quot;&amp;quot;
[1,2,3,4,5,6,7,8]
&amp;quot;&amp;quot;&amp;quot;

#&amp;nbsp;执行reshaple方法来转换数组的形状，将arr1，arr2转换为2行2列的数组
arr1&amp;nbsp;=&amp;nbsp;arr1.reshape(2,&amp;nbsp;2)
arr2&amp;nbsp;=&amp;nbsp;arr2.reshaple(2,&amp;nbsp;2)

#&amp;nbsp;将两个二维的数组沿着横轴方向来拼接
arr3&amp;nbsp;=&amp;nbsp;np.hstack((arr1,&amp;nbsp;arr2))
print(arr3)
&amp;quot;&amp;quot;&amp;quot;
[[1,2,5,6]
&amp;nbsp;[3,4,7,8]]
&amp;quot;&amp;quot;&amp;quot;&lt;/pre&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;2.4.3 numpy.vstack方法&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;numpy.vstack方法用于在垂直方向拼接数组，以下为函数的主要参数:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;blockquote style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;① tup:&amp;nbsp; 元组类型，包含一系列待拼接的数组&lt;/span&gt;&lt;br/&gt;&lt;/blockquote&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;代码示例：&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;#&amp;nbsp;__author__&amp;nbsp;=&amp;nbsp;&amp;quot;薯条老师&amp;quot;

arr1&amp;nbsp;=&amp;nbsp;np.array([1,&amp;nbsp;2,&amp;nbsp;3,&amp;nbsp;4]).reshape(2,2)
arr2&amp;nbsp;=&amp;nbsp;np.array([5,&amp;nbsp;6,&amp;nbsp;7,&amp;nbsp;8]).reshape(2,2)

#&amp;nbsp;将两个数组沿着纵轴方向来拼接
arr3&amp;nbsp;=&amp;nbsp;np.vstack((arr1,&amp;nbsp;arr2))
print(arr3)
&amp;quot;&amp;quot;&amp;quot;
[[1&amp;nbsp;2]
&amp;nbsp;[3&amp;nbsp;4]
&amp;nbsp;[5&amp;nbsp;6]
&amp;nbsp;[7&amp;nbsp;8]]
&amp;quot;&amp;quot;&amp;quot;&lt;/pre&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;2.4.4 numpy.append方法&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;np.append方法用于追加数据值或数组，以下为函数的主要参数：&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;blockquote style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;① arr:&amp;nbsp; 表示一维或二维数组&lt;/span&gt;&lt;br/&gt;&lt;/blockquote&gt;&lt;blockquote style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;② values: 表示添加的值或数组&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;③ axis: 为0时，values与arr的维数必须一致；为1时，values与arr的shape必须一致&lt;/span&gt;&lt;/blockquote&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;代码示例：&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap: nowrap; font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;#&amp;nbsp;__author__&amp;nbsp;=&amp;nbsp;&amp;quot;薯条老师&amp;quot;

arr1&amp;nbsp;=&amp;nbsp;np.array([1,&amp;nbsp;2,&amp;nbsp;3,&amp;nbsp;4]).reshape(2,2)
arr2&amp;nbsp;=&amp;nbsp;np.array([4,&amp;nbsp;5,&amp;nbsp;6,&amp;nbsp;7]).reshape(2,&amp;nbsp;2)


#&amp;nbsp;直接添加数据值
arr3&amp;nbsp;=&amp;nbsp;np.append(arr1.reshape(1,&amp;nbsp;4),&amp;nbsp;5)
print(arr3)
#&amp;nbsp;添加一维的array-like对象
arr3&amp;nbsp;=&amp;nbsp;np.append(arr1.reshape(1,&amp;nbsp;4),&amp;nbsp;[5,&amp;nbsp;6])
print(arr3)


#&amp;nbsp;添加二维的array-like对象
arr3&amp;nbsp;=&amp;nbsp;np.append(arr1,&amp;nbsp;[[5,&amp;nbsp;6]])
print(arr3)&amp;nbsp;&amp;nbsp;#&amp;nbsp;通过输出可知，numpy实质将数组拼接为一维
#&amp;nbsp;通过axis来指定拼接的方向，为0时表示沿着行方向(垂直向下)来拼接、
arr3&amp;nbsp;=&amp;nbsp;np.append(arr1,&amp;nbsp;[[5,&amp;nbsp;6]],&amp;nbsp;axis=0)
print(arr3)


#&amp;nbsp;axis为1时表示沿着列方向(水平向右)来拼接
arr3&amp;nbsp;=&amp;nbsp;np.append(arr1,&amp;nbsp;arr2,&amp;nbsp;axis=1)
arr3&amp;nbsp;=&amp;nbsp;arr3.reshape((2,&amp;nbsp;2,&amp;nbsp;2))
print(arr3)
arr4&amp;nbsp;=&amp;nbsp;np.append(arr3,&amp;nbsp;[[[66,&amp;nbsp;99],&amp;nbsp;[1314,&amp;nbsp;2013]]],&amp;nbsp;axis=0)
print(arr4)&lt;/pre&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;2.4.5 最具实力的小班培训&lt;/h1&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&lt;strong style=&quot;font-size: 16px; background-color: rgb(255, 255, 255); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; box-sizing: border-box;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;div id=&quot;txtbox&quot; class=&quot;tx-text&quot; style=&quot;text-wrap: wrap; box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); line-height: 1.7; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;div id=&quot;txtbox&quot; class=&quot;tx-text&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); line-height: 1.7;&quot;&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;不在广州的同学可提供住宿，也可以报名线上小班，用腾讯会议直播上课&lt;/strong&gt;&lt;span style=&quot;outline: 0px;&quot;&gt;。&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/p&gt;&lt;pre data-offset-key=&quot;2r2a2-0-0&quot; style=&quot;margin-top: 15px; margin-bottom: 15px; padding: 0px; background-color: rgb(255, 255, 255); box-sizing: border-box; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 16px;&quot;&gt;(1) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=13&quot; target=&quot;_self&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: all 0.35s ease 0s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;Python后端工程师高薪就业班，月薪11K-18K，免费领取课程大纲&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 16px;&quot;&gt;(2) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=367&quot; target=&quot;_self&quot; textvalue=&quot;Python中高级爬虫逆向工程师就业班，月薪15K-25K，包拿Offer&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: all 0.35s ease 0s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;Python中高级爬虫逆向工程师就业班，月薪15K-25K，包拿Offer&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 16px;&quot;&gt;(3) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=368&quot; target=&quot;_self&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: all 0.35s ease 0s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;Python数据分析+商业分析+数据科学就业班，企业级项目实战，月薪10K-20K&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 16px;&quot;&gt;(4) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=369&quot; target=&quot;_self&quot; textvalue=&quot;Python量化交易就业班，A股+期货+数字货币量化，月薪10K-40K(5) 机器学习+深度学习算法工程师就业班，月薪20K-50K&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: all 0.35s ease 0s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;Python量化交易就业班，A股+期货+数字货币量化，月薪10K-40K&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 16px;&quot;&gt;(5) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=370&quot; target=&quot;_self&quot; textvalue=&quot;(5) Python机器学习+深度学习算法工程师，月薪20-50K&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: all 0.35s ease 0s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;Python机器学习+深度学习算法工程师，月薪20-50K&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/pre&gt;&lt;div data-block=&quot;true&quot; data-editor=&quot;ddjuk&quot; data-offset-key=&quot;9s3lb-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 1.4em; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); white-space-collapse: preserve; color: rgb(26, 26, 26); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);&quot;&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); max-width: 100%;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 24px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;跟薯条老师学习的学生有拿到&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;花生日记，林氏家居，南方电网，方舟健客,&amp;nbsp; 阿里&lt;/strong&gt;&lt;/strong&gt;等公司的offer, 学生的最低薪资有6K，最高薪资有18K， 平均就业薪资有11000。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 36px;&quot;&gt;&lt;/span&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://chipscoco.com/zb_users/upload/1713257765390.jpg&quot; width=&quot;1101&quot; height=&quot;200&quot; style=&quot;box-sizing: border-box; max-width: 100%; height: 200px; width: 1101px; border: 0px; line-height: 1; vertical-align: middle; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 24px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;扫码咨询薯条老师：&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;&lt;span data-offset-key=&quot;9s3lb-0-2&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px;&quot;&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span data-offset-key=&quot;9s3lb-0-2&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span data-offset-key=&quot;9s3lb-0-2&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px;&quot;&gt;&lt;img src=&quot;https://chipscoco.com/zb_users/upload/2022/08/202208101660124213867136.jpg&quot; title=&quot;扫码领学习资料.jpg&quot; alt=&quot;扫码领学习资料.jpg&quot; style=&quot;box-sizing: border-box; max-width: 100%; border: 0px; line-height: 1; vertical-align: middle; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); height: auto !important; width: auto !important;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;</description><pubDate>Wed, 29 May 2024 09:07:50 +0800</pubDate></item><item><title>2.3节: Numpy数组构造</title><link>https://chipscoco.com/?id=379</link><description>&lt;h2 style=&quot;text-wrap: wrap; box-sizing: border-box; margin: 15px 0px; padding: 10px 15px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-weight: 400; border-left: 4px solid rgb(62, 111, 143); background-color: rgb(242, 242, 242); font-size: 20px; border-top-color: rgb(62, 111, 143); border-right-color: rgb(62, 111, 143); border-bottom-color: rgb(62, 111, 143); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;广州番禺Python, Java全职脱产班+周末班精品小班培训&lt;/h2&gt;&lt;blockquote style=&quot;text-wrap: wrap; box-sizing: border-box; border-left: 10px solid rgba(102, 128, 153, 0.075); background-color: rgba(102, 128, 153, 0.05); border-radius: 0px 5px 5px 0px; padding: 15px 20px; margin: 0px 0px 6px; color: rgb(102, 102, 102); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px;&quot;&gt;&lt;p&gt;薯条老师在广州做Python和Java的精品小班培训，一个班最多8个人，学员的就业薪资在10K到18K之间。不在广州的同学可提供住宿，也可以报名线上小班，用腾讯会议直播上课。培训的课程有&lt;strong style=&quot;color: rgb(149, 55, 52);&quot;&gt;Java大数据，&lt;/strong&gt;&lt;span style=&quot;color: #953734;&quot;&gt;&lt;strong&gt;Python中高级爬虫(JS逆向+安卓逆向)，Python数据分析+数据科学+商业分析，A股+期货+数字货币的金融量化交易，机器学习+深度学习算法&lt;/strong&gt;&lt;/span&gt;等。授课详情请点击：&lt;a href=&quot;https://chipscoco.com/?cate=6&quot; target=&quot;_self&quot;&gt;https://chipscoco.com/?cate=6&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;2.3.1 构造数组的常用方法&lt;/h1&gt;&lt;p style=&quot;margin-top: 0px; margin-bottom: 1.4em; white-space: pre-wrap; color: rgb(26, 26, 26); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-family: 微软雅黑, 宋体, Arial, Helvetica, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;通过下表所示的方法来构造Numpy中的数组对象：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;table width=&quot;1054&quot;&gt;&lt;thead&gt;&lt;tr class=&quot;firstRow&quot;&gt;&lt;th style=&quot;border-color: rgb(221, 221, 221);&quot; width=&quot;186&quot;&gt;操作方法&lt;br/&gt;&lt;/th&gt;&lt;th style=&quot;border-color: rgb(221, 221, 221);&quot; width=&quot;867&quot;&gt;描述&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; style=&quot;word-break: break-all; border-color: rgb(221, 221, 221);&quot; width=&quot;186&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;numpy.array()&lt;/span&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; style=&quot;word-break: break-all; border-color: rgb(221, 221, 221);&quot; width=&quot;867&quot;&gt;传递一个支持数组接口的对象来构造numpy数组，比如列表，元组等&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; style=&quot;border-color: rgb(221, 221, 221);&quot; width=&quot;186&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;numpy.arange()&lt;/span&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; style=&quot;word-break: break-all; border-color: rgb(221, 221, 221);&quot; width=&quot;867&quot;&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;构造一个元素值在指定区间的数组&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; style=&quot;border-color: rgb(221, 221, 221);&quot; width=&quot;186&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;numpy.random.randn()&lt;/span&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; style=&quot;word-break: break-all; border-color: rgb(221, 221, 221);&quot; width=&quot;867&quot;&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;构造一个服从正态分布的数组&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; style=&quot;border-color: rgb(221, 221, 221);&quot; width=&quot;186&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;numpy.random.randint()&lt;/span&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; style=&quot;word-break: break-all; border-color: rgb(221, 221, 221);&quot; width=&quot;867&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;构造一个整数数组&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; style=&quot;border-color: rgb(221, 221, 221);&quot; width=&quot;186&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;numpy.random.uniform()&lt;/span&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; style=&quot;word-break: break-all; border-color: rgb(221, 221, 221);&quot; width=&quot;867&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;构造一个实数数组&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; colspan=&quot;1&quot; rowspan=&quot;1&quot; style=&quot;border-left-color: rgb(221, 221, 221); border-top-color: rgb(221, 221, 221);&quot;&gt;numpy.ones()&lt;br/&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; colspan=&quot;1&quot; rowspan=&quot;1&quot; style=&quot;border-left-color: rgb(221, 221, 221); border-top-color: rgb(221, 221, 221);&quot;&gt;构造一个元素值全为1的数组&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; colspan=&quot;1&quot; rowspan=&quot;1&quot;&gt;numpy.zeros()&lt;br/&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; colspan=&quot;1&quot; rowspan=&quot;1&quot;&gt;构造一个元素中全为0的数组&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;2.3.2 numpy.array方法&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;numpy.array方法的主要参数:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;① object:&amp;nbsp; 支持数组接口的对象，比如列表，元组等序列结构&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;② dtype: 可选参数，表示元素的数据类型，比如numpy.int32、numpy.float64等。在默认情况下，numpy会自动推断元素的类型。 &amp;nbsp;&lt;/span&gt;&lt;/blockquote&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;代码实例：&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;import&amp;nbsp;numpy&amp;nbsp;as&amp;nbsp;np
import&amp;nbsp;radom
numbers&amp;nbsp;=&amp;nbsp;[random.randint(-10,&amp;nbsp;10)&amp;nbsp;for&amp;nbsp;_&amp;nbsp;in&amp;nbsp;range(10)]
#&amp;nbsp;调用array方法来构造一维数组
arr&amp;nbsp;=&amp;nbsp;np.array(numbers)&lt;/pre&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;2.3.3 numpy.arange方法&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;numpy.arange方法用来构造一个指定范围区间的数组，以下为方法的参数说明:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;blockquote style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;① start:&amp;nbsp; 序列的起始值，默认为0&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;② stop:&amp;nbsp; 序列的结束值，&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;③ step:&amp;nbsp; 序列的步长，可选参数，默认为1&lt;/span&gt;&lt;/blockquote&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;代码实例：&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;import&amp;nbsp;numpy&amp;nbsp;as&amp;nbsp;np
#&amp;nbsp;只传递一个参数时，该参数表示stop的值
array&amp;nbsp;=&amp;nbsp;np.arange(10)&lt;/pre&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;2.3.4 numpy.random.randn方法&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;numpy.random.randn方法用来构造一个服从标准正态分布的数组，以下为方法的参数说明:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;blockquote style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;① n:&amp;nbsp; 标量或元组。传递标量时，表示构造n个数，传递元组时，构造的是特定shape且服从标准正态分布的数组&lt;/span&gt;&lt;br/&gt;&lt;/blockquote&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;代码实例：&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;import&amp;nbsp;numpy&amp;nbsp;as&amp;nbsp;np
#&amp;nbsp;构造包含10个元素的标准正态分布数组
array&amp;nbsp;=&amp;nbsp;np.random.randn(10)&lt;/pre&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;2.3.5 numpy.random.randint方法&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;numpy.random.randint方法用来构造一个包含n个元素的随机整数数组，以下为方法的参数说明:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;blockquote style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;① low:&amp;nbsp; 区间的起始值&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;② high:&amp;nbsp; 区间的结束值&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br/&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;③ size:&amp;nbsp; 元素的总个数&lt;/span&gt;&lt;/blockquote&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;代码实例：&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;import&amp;nbsp;numpy&amp;nbsp;as&amp;nbsp;np
#&amp;nbsp;构造一个包含12个随机整数的数组，元素的范围在0到10之间
array&amp;nbsp;=&amp;nbsp;np.random.randint(0,&amp;nbsp;10,&amp;nbsp;12)&lt;/pre&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;2.3.6 numpy.random.uniform方法&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;numpy.random.uniform方法用来构造一个包含n个元素的随机浮点数数组，以下为方法的参数说明:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;blockquote style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;① low:&amp;nbsp; 区间的起始值&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;② high:&amp;nbsp; 区间的结束值&lt;/span&gt; &amp;nbsp;&lt;br/&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;③ size:&amp;nbsp; 元素的总个数&lt;/span&gt;&lt;/blockquote&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;代码实例：&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;import&amp;nbsp;numpy&amp;nbsp;as&amp;nbsp;np
#&amp;nbsp;构造一个包含12个随机浮点数的数组，元素的范围在0到10之间
array&amp;nbsp;=&amp;nbsp;np.random.uniform(0,&amp;nbsp;10,&amp;nbsp;12)&lt;/pre&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;2.3.7 numpy.random.ones方法&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;numpy.random.ones方法用来构造一个元素全为1的数组，以下为方法的参数说明：&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;blockquote style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;① shape:&amp;nbsp; 数组的形状，标量或元组类型&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;② dtype:&amp;nbsp; 元素的类型，可选参数&lt;/span&gt;&lt;/blockquote&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;代码实例：&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;import&amp;nbsp;numpy&amp;nbsp;as&amp;nbsp;np
#&amp;nbsp;构造一个包含12个1的一维数组
array&amp;nbsp;=&amp;nbsp;np.random.ones(12)
#&amp;nbsp;构造一个3行4列的全1数组
array&amp;nbsp;=&amp;nbsp;np.random.ones((3,&amp;nbsp;4))&lt;/pre&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;2.3.8 numpy.random.zeros方法&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;numpy.random.zeros方法用来构造一个元素全为0的数组，以下为方法的参数说明：&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;blockquote style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;① shape:&amp;nbsp; 数组的形状，标量或元组类型&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;② dtype:&amp;nbsp; 元素的类型，可选参数&lt;/span&gt;&lt;/blockquote&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;代码实例：&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;import&amp;nbsp;numpy&amp;nbsp;as&amp;nbsp;np
#&amp;nbsp;构造一个包含12个0的一维数组
array&amp;nbsp;=&amp;nbsp;np.random.zeros(12)
#&amp;nbsp;构造一个3行4列的全0数组
array&amp;nbsp;=&amp;nbsp;np.random.zeros((3,&amp;nbsp;4))&lt;/pre&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;2.3.9 最具实力的小班培训&lt;/h1&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&lt;strong style=&quot;font-size: 16px; background-color: rgb(255, 255, 255); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; box-sizing: border-box;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;div id=&quot;txtbox&quot; class=&quot;tx-text&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); line-height: 1.7; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; text-wrap: wrap;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;div id=&quot;txtbox&quot; class=&quot;tx-text&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); line-height: 1.7; color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; text-wrap: wrap;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;不在广州的同学可提供住宿，也可以报名线上小班，用腾讯会议直播上课&lt;/strong&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;。&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/p&gt;&lt;pre data-offset-key=&quot;2r2a2-0-0&quot; style=&quot;box-sizing: border-box; margin-top: 15px; margin-bottom: 15px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(1) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=13&quot; target=&quot;_self&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: all 0.35s ease 0s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;Python后端工程师高薪就业班，月薪11K-18K，免费领取课程大纲&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(2) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=367&quot; target=&quot;_self&quot; textvalue=&quot;Python中高级爬虫逆向工程师就业班，月薪15K-25K，包拿Offer&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: all 0.35s ease 0s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;Python中高级爬虫逆向工程师就业班，月薪15K-25K，包拿Offer&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(3) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=368&quot; target=&quot;_self&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: all 0.35s ease 0s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;Python数据分析+商业分析+数据科学就业班，企业级项目实战，月薪10K-20K&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(4) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=369&quot; target=&quot;_self&quot; textvalue=&quot;Python量化交易就业班，A股+期货+数字货币量化，月薪10K-40K(5) 机器学习+深度学习算法工程师就业班，月薪20K-50K&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: all 0.35s ease 0s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;Python量化交易就业班，A股+期货+数字货币量化，月薪10K-40K&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 16px;&quot;&gt;(5) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=370&quot; target=&quot;_self&quot; textvalue=&quot;(5) Python机器学习+深度学习算法工程师，月薪20-50K&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: all 0.35s ease 0s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;Python机器学习+深度学习算法工程师，月薪20-50K&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/pre&gt;&lt;div data-block=&quot;true&quot; data-editor=&quot;ddjuk&quot; data-offset-key=&quot;9s3lb-0-0&quot; style=&quot;box-sizing: border-box; margin: 0px 0px 1.4em; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); white-space-collapse: preserve; color: rgb(26, 26, 26); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); max-width: 100%;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 24px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;跟薯条老师学习的学生有拿到&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;花生日记，林氏家居，南方电网，方舟健客,&amp;nbsp; 阿里&lt;/strong&gt;&lt;/strong&gt;等公司的offer, 学生的最低薪资有6K，最高薪资有18K， 平均就业薪资有11000。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 36px;&quot;&gt;&lt;/span&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://chipscoco.com/zb_users/upload/1713257765390.jpg&quot; width=&quot;1101&quot; height=&quot;200&quot; style=&quot;box-sizing: border-box; max-width: 100%; height: 200px; width: 1101px; border: 0px; line-height: 1; vertical-align: middle; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ; font-size: 24px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;扫码咨询薯条老师：&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;&lt;span data-offset-key=&quot;9s3lb-0-2&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span data-offset-key=&quot;9s3lb-0-2&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin-top: 10px; margin-bottom: 10px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span data-offset-key=&quot;9s3lb-0-2&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: ;&quot;&gt;&lt;img src=&quot;https://chipscoco.com/zb_users/upload/2022/08/202208101660124213867136.jpg&quot; title=&quot;扫码领学习资料.jpg&quot; alt=&quot;扫码领学习资料.jpg&quot; style=&quot;box-sizing: border-box; max-width: 100%; height: auto !important; width: auto !important; border: 0px; line-height: 1; vertical-align: middle; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;</description><pubDate>Tue, 21 May 2024 09:28:22 +0800</pubDate></item><item><title>2.2节: Numpy基础概念</title><link>https://chipscoco.com/?id=378</link><description>&lt;h2 style=&quot;text-wrap: wrap; box-sizing: border-box; margin: 15px 0px; padding: 10px 15px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-weight: 400; border-left: 4px solid rgb(62, 111, 143); background-color: rgb(242, 242, 242); font-size: 20px; border-top-color: rgb(62, 111, 143); border-right-color: rgb(62, 111, 143); border-bottom-color: rgb(62, 111, 143); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;广州番禺Python, Java全职脱产班+周末班精品小班培训&lt;/h2&gt;&lt;blockquote style=&quot;text-wrap: wrap; box-sizing: border-box; border-left: 10px solid rgba(102, 128, 153, 0.075); background-color: rgba(102, 128, 153, 0.05); border-radius: 0px 5px 5px 0px; padding: 15px 20px; margin: 0px 0px 6px; color: rgb(102, 102, 102); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px;&quot;&gt;&lt;p&gt;薯条老师在广州做Python和Java的精品小班培训，一个班最多8个人，学员的就业薪资在10K到18K之间。不在广州的同学可提供住宿，也可以报名线上小班，用腾讯会议直播上课。培训的课程有&lt;strong style=&quot;color: rgb(149, 55, 52);&quot;&gt;Java大数据，&lt;/strong&gt;&lt;span style=&quot;color: #953734;&quot;&gt;&lt;strong&gt;Python中高级爬虫(JS逆向+安卓逆向)，Python数据分析+数据科学+商业分析，A股+期货+数字货币的金融量化交易，机器学习+深度学习算法&lt;/strong&gt;&lt;/span&gt;等。授课详情请点击：&lt;a href=&quot;https://chipscoco.com/?cate=6&quot; target=&quot;_self&quot;&gt;https://chipscoco.com/?cate=6&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;2.2.1 numpy简介&lt;/h1&gt;&lt;p style=&quot;margin-top: 0px; margin-bottom: 1.4em; white-space: pre-wrap; color: rgb(26, 26, 26); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-family: 微软雅黑, 宋体, Arial, Helvetica, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;NumPy是用来进行高性能科学计算以及数据分析的基础包。在Python中导入numpy时，通常将其别名设置为np:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;import&amp;nbsp;numpy&amp;nbsp;as&amp;nbsp;np
#&amp;nbsp;使用array方法来构造一个数组
array&amp;nbsp;=&amp;nbsp;np.array([1,&amp;nbsp;3,&amp;nbsp;5,&amp;nbsp;7,&amp;nbsp;9,&amp;nbsp;11])&lt;/pre&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;2.2.2 numpy与list&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;Numpy数组与List的主要区别在于Numpy中的数组是一个连续的内存块，元素通常为相同类型。List也是顺序存储结构，但存储的是对象的引用。Numpy支持向量，矩阵，线性代数数学运算，且专门针对数组的操作和运算进行了设计，其存储效率和运算性能远优于嵌套列表。&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;2.2.3 ndarray及其属性&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; white-space-collapse: preserve;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;NumPy中的Ndarray，是一个n维的数组对象。Ndarray中的每个元素在内存中占有相同存储大小的空间。Ndarray主要由下表所示的属性构成:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;table align=&quot;left&quot;&gt;&lt;thead&gt;&lt;tr class=&quot;firstRow&quot;&gt;&lt;th style=&quot;border-color: rgb(221, 221, 221); word-break: break-all;&quot; width=&quot;185&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;属性名&lt;br/&gt;&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;border-color: rgb(221, 221, 221);&quot; width=&quot;901&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;属性值&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; style=&quot;border-color: rgb(221, 221, 221);&quot; width=&quot;185&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;data&lt;/span&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; style=&quot;border-color: rgb(221, 221, 221); word-break: break-all;&quot; width=&quot;901&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;指向内存数据区的指针&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; style=&quot;border-color: rgb(221, 221, 221);&quot; width=&quot;185&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;dtype&lt;/span&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; style=&quot;border-color: rgb(221, 221, 221); word-break: break-all;&quot; width=&quot;901&quot;&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;数组元素的数据类型&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; style=&quot;border-color: rgb(221, 221, 221);&quot; width=&quot;185&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;shape&lt;/span&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; style=&quot;border-color: rgb(221, 221, 221); word-break: break-all;&quot; width=&quot;901&quot;&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;数组的形状，一个表示各维度大小的元组&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; style=&quot;border-color: rgb(221, 221, 221);&quot; width=&quot;185&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;ndim&lt;/span&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; style=&quot;border-color: rgb(221, 221, 221); word-break: break-all;&quot; width=&quot;901&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;数组的维数&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; style=&quot;border-color: rgb(221, 221, 221);&quot; width=&quot;185&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;size&lt;/span&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; style=&quot;border-color: rgb(221, 221, 221); word-break: break-all;&quot; width=&quot;901&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;数组的元素个数&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;使用numpy的array等方法构造数组，再通过成员操作符.来访问数组的属性:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;import&amp;nbsp;numpy&amp;nbsp;as&amp;nbsp;np
#&amp;nbsp;传递一维的序列结构来构造一维数组
array&amp;nbsp;=&amp;nbsp;np.array([1，&amp;nbsp;2，&amp;nbsp;3，&amp;nbsp;4，&amp;nbsp;5])

#&amp;nbsp;(1)&amp;nbsp;数组元素的类型
print(array.dtype)
#&amp;nbsp;(2)&amp;nbsp;数组的形状,array为1行5列的数组，(1,5)即shape
print(array.shape)

#&amp;nbsp;(3)&amp;nbsp;数组的维数,&amp;nbsp;相同维数的数组，或有不同的shape
#&amp;nbsp;比如(2,3)的数组与(3,2)的数组，其维数都为2
print(array.ndim)

#&amp;nbsp;(4)&amp;nbsp;数组的总元素个数
print(array.size)&lt;/pre&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;2.2.4 numpy支持的数据类型&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; white-space-collapse: preserve;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;Numpy主要提供的是整型，浮点型等数据类型:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;table align=&quot;left&quot;&gt;&lt;thead&gt;&lt;tr class=&quot;firstRow&quot;&gt;&lt;th width=&quot;185&quot; style=&quot;border-top-color: rgb(221, 221, 221); word-break: break-all;&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;类型名&lt;/span&gt;&lt;/th&gt;&lt;th width=&quot;901&quot; style=&quot;border-top-color: rgb(221, 221, 221); word-break: break-all;&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;描述&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;185&quot; style=&quot;word-break: break-all;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;int_&lt;/span&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;901&quot; style=&quot;word-break: break-all;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;默认的整型&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;185&quot; style=&quot;word-break: break-all;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;intN&lt;/span&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;901&quot; style=&quot;word-break: break-all;&quot;&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;这里的N取值为8，16，32，64。N值代表位数，比如int8,表示8位的整型，int32表示4个字节的整型。&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;185&quot; style=&quot;word-break: break-all;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;uintN&lt;/span&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;901&quot; style=&quot;word-break: break-all;&quot;&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;unit表示无符号整型，所谓无符号，就是非负的整型值。N取值同intN&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;185&quot; style=&quot;word-break: break-all;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;float&lt;/span&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;901&quot; style=&quot;word-break: break-all;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;浮点类型&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;185&quot; style=&quot;word-break: break-all;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;floatN&lt;/span&gt;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;901&quot; style=&quot;word-break: break-all;&quot;&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;这里的N取值为16，32，64。float_即float64&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;在下节课程中将系统讲解Numpy之数组对象的构造，并提供详细的代码实例。&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;2.2.5 最具实力的小班培训&lt;/h1&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&lt;strong style=&quot;font-size: 16px; background-color: rgb(255, 255, 255); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; box-sizing: border-box;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;不在广州的同学可提供住宿，也可以报名线上小班，用腾讯会议直播上课&lt;/strong&gt;&lt;span style=&quot;outline: 0px;&quot;&gt;。&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/p&gt;&lt;pre data-offset-key=&quot;2r2a2-0-0&quot; style=&quot;margin-top: 15px; margin-bottom: 15px; padding: 0px; background-color: rgb(255, 255, 255); box-sizing: border-box; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 16px;&quot;&gt;(1) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=13&quot; target=&quot;_self&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: all 0.35s ease 0s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;Python后端工程师高薪就业班，月薪11K-18K，免费领取课程大纲&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 16px;&quot;&gt;(2) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=367&quot; target=&quot;_self&quot; textvalue=&quot;Python中高级爬虫逆向工程师就业班，月薪15K-25K，包拿Offer&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: all 0.35s ease 0s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;Python中高级爬虫逆向工程师就业班，月薪15K-25K，包拿Offer&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 16px;&quot;&gt;(3) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=368&quot; target=&quot;_self&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: all 0.35s ease 0s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;Python数据分析+商业分析+数据科学就业班，企业级项目实战，月薪10K-20K&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 16px;&quot;&gt;(4) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=369&quot; target=&quot;_self&quot; textvalue=&quot;Python量化交易就业班，A股+期货+数字货币量化，月薪10K-40K(5) 机器学习+深度学习算法工程师就业班，月薪20K-50K&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: all 0.35s ease 0s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;Python量化交易就业班，A股+期货+数字货币量化，月薪10K-40K&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 16px;&quot;&gt;(5) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=370&quot; target=&quot;_self&quot; textvalue=&quot;(5) Python机器学习+深度学习算法工程师，月薪20-50K&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: all 0.35s ease 0s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;Python机器学习+深度学习算法工程师，月薪20-50K&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/pre&gt;&lt;div data-block=&quot;true&quot; data-editor=&quot;ddjuk&quot; data-offset-key=&quot;9s3lb-0-0&quot; style=&quot;white-space: pre-wrap; box-sizing: border-box; margin: 0px 0px 1.4em; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(26, 26, 26); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);&quot;&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); max-width: 100%;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 24px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;跟薯条老师学习的学生有拿到&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;花生日记，林氏家居，南方电网，方舟健客,&amp;nbsp; 阿里&lt;/strong&gt;&lt;/strong&gt;等公司的offer, 学生的最低薪资有6K，最高薪资有18K， 平均就业薪资有11000。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 36px;&quot;&gt;&lt;/span&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://chipscoco.com/zb_users/upload/1713257765390.jpg&quot; width=&quot;1101&quot; height=&quot;200&quot; style=&quot;box-sizing: border-box; max-width: 100%; height: 200px; width: 1101px; border: 0px; line-height: 1; vertical-align: middle; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 24px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;扫码咨询薯条老师：&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;strong&gt;&lt;span data-offset-key=&quot;9s3lb-0-2&quot;&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span data-offset-key=&quot;9s3lb-0-2&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span data-offset-key=&quot;9s3lb-0-2&quot;&gt;&lt;img src=&quot;https://chipscoco.com/zb_users/upload/2022/08/202208101660124213867136.jpg&quot; title=&quot;扫码领学习资料.jpg&quot; alt=&quot;扫码领学习资料.jpg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;</description><pubDate>Thu, 02 May 2024 09:26:27 +0800</pubDate></item><item><title>2.1节: Numpy简介与安装</title><link>https://chipscoco.com/?id=377</link><description>&lt;h2 style=&quot;text-wrap: wrap; box-sizing: border-box; margin: 15px 0px; padding: 10px 15px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-weight: 400; border-left: 4px solid rgb(62, 111, 143); background-color: rgb(242, 242, 242); font-size: 20px; border-top-color: rgb(62, 111, 143); border-right-color: rgb(62, 111, 143); border-bottom-color: rgb(62, 111, 143); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;广州番禺Python, Java全职脱产班+周末班精品小班培训&lt;/h2&gt;&lt;blockquote style=&quot;text-wrap: wrap; box-sizing: border-box; border-left: 10px solid rgba(102, 128, 153, 0.075); background-color: rgba(102, 128, 153, 0.05); border-radius: 0px 5px 5px 0px; padding: 15px 20px; margin: 0px 0px 6px; color: rgb(102, 102, 102); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px;&quot;&gt;&lt;p&gt;薯条老师在广州做Python和Java的精品小班培训，一个班最多8个人，学员的就业薪资在10K到18K之间。不在广州的同学可提供住宿，也可以报名线上小班，用腾讯会议直播上课。培训的课程有&lt;strong style=&quot;color: rgb(149, 55, 52);&quot;&gt;Java大数据，&lt;/strong&gt;&lt;span style=&quot;color: #953734;&quot;&gt;&lt;strong&gt;Python中高级爬虫(JS逆向+安卓逆向)，Python数据分析+数据科学+商业分析，A股+期货+数字货币的金融量化交易，机器学习+深度学习算法&lt;/strong&gt;&lt;/span&gt;等。授课详情请点击：&lt;a href=&quot;https://chipscoco.com/?cate=6&quot; target=&quot;_self&quot;&gt;https://chipscoco.com/?cate=6&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;2.1.1 数据分析三剑客&lt;/h1&gt;&lt;p style=&quot;margin-top: 0px; margin-bottom: 1.4em; white-space: pre-wrap; color: rgb(26, 26, 26); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-family: 微软雅黑, 宋体, Arial, Helvetica, sans-serif;&quot;&gt;系统学习Python数据分析，需重点掌握用于数据分析的三大利器:Numpy,Pandas,Matplotlib。NumPy是用来进行高性能科学计算以及数据分析的基础包，后面要学习的pandas以及matplotlib库，都基于numpy所实现。&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;2.1.2 命令行安装numpy&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;在windows系统中，需按下键盘的windows键，然后执行cmd命令进入命令行。进入windows命令行以后，需执行pip命令来安装numpy:&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-bash&quot;&gt;pip&amp;nbsp;install&amp;nbsp;numpy&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;安装完毕以后再执行python命令，以进入Python交互模式。进入Python交互模式以后，再执行import命令来导入numpy：&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-bash&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&amp;nbsp;import&amp;nbsp;numpy
&amp;gt;&amp;gt;&amp;gt;&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;在导入numpy模块的过程中，如果没有抛出错误信息，则说明安装成功。&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;2.1.3 在PyCharm中安装numpy&lt;/h1&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color:#1a1a1a;font-family:-apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 16px; white-space-collapse: preserve;&quot;&gt;也可以直接在PyCharm中安装numpy。&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 16px; white-space-collapse: preserve; color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif;&quot;&gt;打开PyCharm, 找到IDE右上角的工具小图标：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px; white-space-collapse: preserve; color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif;&quot;&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://chipscoco.com/zb_users/upload/1714380227334.jpg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; white-space-collapse: preserve;&quot;&gt;再点击下拉的settings菜单进入IDE配置面板。在配置面板左侧的导航菜单中选中Project下的Python Interpreter, 然后再点击面板右边的+号按钮:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 16px; white-space-collapse: preserve; color: #1A1A1A; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif;&quot;&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://chipscoco.com/zb_users/upload/1714380380440.jpg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color:#1a1a1a;font-family:-apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 16px; white-space-collapse: preserve;&quot;&gt;点击+号按钮后，PyCharm会弹出下图所示的包安装窗口。在该窗口的搜索框中输入并选中numpy, &amp;nbsp;最后点击窗口底部的Install Package按钮进行安装。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color:#1a1a1a;font-family:-apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 16px; white-space-collapse: preserve;&quot;&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://chipscoco.com/zb_users/upload/1714380758384.jpg&quot;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color:#1a1a1a;font-family:-apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 16px; white-space-collapse: preserve;&quot;&gt;安装成功后，PyCharm会显式安装成功的消息。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;text-wrap: wrap;&quot;&gt;2.1.4 最具实力的小班培训&lt;/h1&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&lt;strong style=&quot;font-size: 16px; background-color: rgb(255, 255, 255); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; box-sizing: border-box;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; text-wrap: wrap; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 18px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;不在广州的同学可提供住宿，也可以报名线上小班，用腾讯会议直播上课&lt;/strong&gt;&lt;span style=&quot;outline: 0px;&quot;&gt;。&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/p&gt;&lt;pre data-offset-key=&quot;2r2a2-0-0&quot; style=&quot;margin-top: 15px; margin-bottom: 15px; padding: 0px; background-color: rgb(255, 255, 255); box-sizing: border-box; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 16px;&quot;&gt;(1) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=13&quot; target=&quot;_self&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: all 0.35s ease 0s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;Python后端工程师高薪就业班，月薪11K-18K，免费领取课程大纲&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 16px;&quot;&gt;(2) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=367&quot; target=&quot;_self&quot; textvalue=&quot;Python中高级爬虫逆向工程师就业班，月薪15K-25K，包拿Offer&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: all 0.35s ease 0s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;Python中高级爬虫逆向工程师就业班，月薪15K-25K，包拿Offer&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 16px;&quot;&gt;(3) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=368&quot; target=&quot;_self&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: all 0.35s ease 0s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;Python数据分析+商业分析+数据科学就业班，企业级项目实战，月薪10K-20K&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 16px;&quot;&gt;(4) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=369&quot; target=&quot;_self&quot; textvalue=&quot;Python量化交易就业班，A股+期货+数字货币量化，月薪10K-40K(5) 机器学习+深度学习算法工程师就业班，月薪20K-50K&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: all 0.35s ease 0s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;Python量化交易就业班，A股+期货+数字货币量化，月薪10K-40K&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 16px;&quot;&gt;(5) &lt;/span&gt;&lt;a href=&quot;https://chipscoco.com/?id=370&quot; target=&quot;_self&quot; textvalue=&quot;(5) Python机器学习+深度学习算法工程师，月薪20-50K&quot; style=&quot;box-sizing: border-box; text-decoration-line: none; color: rgb(74, 74, 74); transition: all 0.35s ease 0s; outline: 0px; border-bottom: 2px solid rgb(132, 207, 109); font-size: 16px;&quot;&gt;Python机器学习+深度学习算法工程师，月薪20-50K&lt;/a&gt;&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/pre&gt;&lt;div data-block=&quot;true&quot; data-editor=&quot;ddjuk&quot; data-offset-key=&quot;9s3lb-0-0&quot; style=&quot;white-space: pre-wrap; box-sizing: border-box; margin: 0px 0px 1.4em; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(26, 26, 26); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, &amp;quot;Source Han Sans SC&amp;quot;, &amp;quot;Noto Sans CJK SC&amp;quot;, &amp;quot;WenQuanYi Micro Hei&amp;quot;, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);&quot;&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); max-width: 100%;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 24px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;跟薯条老师学习的学生有拿到&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;花生日记，林氏家居，南方电网，方舟健客,&amp;nbsp; 阿里&lt;/strong&gt;&lt;/strong&gt;等公司的offer, 学生的最低薪资有6K，最高薪资有18K， 平均就业薪资有11000。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(51, 51, 51); font-family: &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 36px;&quot;&gt;&lt;/span&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://chipscoco.com/zb_users/upload/1713257765390.jpg&quot; width=&quot;1101&quot; height=&quot;200&quot; style=&quot;box-sizing: border-box; max-width: 100%; height: 200px; width: 1101px; border: 0px; line-height: 1; vertical-align: middle; margin: 0px; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 10px; margin-bottom: 10px; box-sizing: border-box; padding: 0px; outline: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 24px;&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;扫码咨询薯条老师：&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;strong&gt;&lt;span data-offset-key=&quot;9s3lb-0-2&quot;&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span data-offset-key=&quot;9s3lb-0-2&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-wrap: wrap;&quot;&gt;&lt;span data-offset-key=&quot;9s3lb-0-2&quot;&gt;&lt;img src=&quot;https://chipscoco.com/zb_users/upload/2022/08/202208101660124213867136.jpg&quot; title=&quot;扫码领学习资料.jpg&quot; alt=&quot;扫码领学习资料.jpg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;</description><pubDate>Mon, 29 Apr 2024 16:55:54 +0800</pubDate></item></channel></rss>