# 什么，= python的意思？(What does ,= mean in python?)

``` 我想知道什么`,=`或`, =`表示在python？
matplotlib的例子：
```plot1, = ax01.plot(t,yp1,'b-')
```I wonder what `,=` or `, =` means in python?
Example from matplotlib:
```plot1, = ax01.plot(t,yp1,'b-')
```原文：https://stackoverflow.com/questions/30601479```

## 最满意答案

``` 这是一个元组拆包的形式。 带括号：
```(plot1,) = ax01.plot(t,yp1,'b-')
```
`ax01.plot()`返回一个包含一个元素的元组，并将该元素分配给`plot1` 。 没有那个逗号（可能是括号）， `plot1`将被分配整个元组。 在以下示例中观察`a`和`b`之间的区别：
```>>> def foo():
...     return (1,)
...
>>> (a,) = foo()
>>> b = foo()
>>> a
1
>>> b
(1,)
```
您可以在`(a,)`和`(1,)`省略括号`(a,)`为了清楚起见，我留下了它们。 It's a form of tuple unpacking. With parentheses:
```(plot1,) = ax01.plot(t,yp1,'b-')
```
`ax01.plot()` returns a tuple containing one element, and this element is assigned to `plot1`. Without that comma (and possibly the parentheses), `plot1` would have been assigned the whole tuple. Observe the difference between `a` and `b` in the following example:
```>>> def foo():
...     return (1,)
...
>>> (a,) = foo()
>>> b = foo()
>>> a
1
>>> b
(1,)
```
You can omit the parentheses both in `(a,)` and `(1,)`, I left them for the sake of clarity.```
2015-06-02

## Python的安装问题

1. 下载后，双击下载包，进入Python安装向导，安装非常简单，你只需要使用默认的设置一直点击"下一步"直到安装完成即可。 2. 测试是否安装成功: a 点击电脑左下角搜索中 输入“cmd”，之后在弹出的命令行窗口内输入：python b 如果安装成功，会直接进入到 Python的编程环境，之后“quit（）”退出；如果没有进入到Python编程环境则代表没有安装成功

## 关于python的问题

month_name=months[int(month)-1] od=day+endings[int(day)-1]

## python实验总结

#!/usr/bin/env python # Filename: appui.py """ .. moduleauthor:: .... .. test module of Tkinter """ from Tkinter import * import tkMessageBox root = Tk() root.geometry('850x40+80+80') #设置窗体高宽与窗体相对屏幕左上角位置 class...

## python用什么编辑器比较好？？？

eclipse或者aptana里的pydev、pyCharm、Stani's Python Editor

## 关于python

An event can be thought of as a moment in time when something important happens. The problem is, if we want to know when the event happens, we have to watch for it, and that can be expensive. Imagine a phone that, instead off ringing, flashed a light ...