
Python
你可真搞笑
这个作者很懒,什么都没留下…
展开
-
Python中print()函数中的f字符
这个”f“字符其实和print函数没有关系,这个f字符代表的是Formatted string literal,例如如下代码: # Python name = "Fred" f"He said his name is {name!r}." 这个Formatted string literal还有几种模式:s | r | a 。具体使用规则参考链接。 ...原创 2021-12-23 14:48:41 · 1644 阅读 · 0 评论 -
Python中matplotlib.axes.Axes.set_title中r字符的理解
不知道各位有没有碰见过以下的情形,就是大量的Python教程里中Axes.set_title函数的使用形式如下: # Python ax.set_title('string') 例如如下的代码: # Python import numpy as np import matplotlib.pyplot as plt import matplotlib.cbook as cbook price_data = (cbook.get_sample_data('goog.npz', np_load=T原创 2021-12-23 10:45:49 · 2887 阅读 · 0 评论