ucanuupnobb
ucanuupnobb copied to clipboard
you can you up, no bb. 自学 python 编程过程中的挑战、笔记及我的践友们。
文件编码格式改为 UTF-8 BOM格式,两者打开都显示OK 用记事本打开,另存为,选择带有BOM的 utf-8
https://blog.csdn.net/hanchao5272/article/details/79435730
我想输入一段正常的文本如下: [1] 本概念推荐阅读某人好文 [https://sample.com](https://sample.com),关于 "[]"的用法。 如果我没有留意到中文和字符之间的空格 [1]本概念推荐阅读某人好文 [https://sample.com](https://sample.com),关于 "[]"的用法。
![image](https://user-images.githubusercontent.com/31027645/70223134-21e60280-1786-11ea-996f-4debaeeb5f3f.png)
正则匹配
环境: win10 + vscode + 内置搜索 对象: ipynb文件 场景: 新书内容编辑
What gets printed? ```python def print_header(str): print("+++" + str + "+++") print_header.category = 1 print_header.text = "some info" print_header("{} and {}".format(print_header.category, print_header.text)) ```
What gets printed? ```python class NumFactory: def __init__(self, n): self.val = n def timesTwo(self): self.val *= 2 def plusTwo(self): self.val += 2 f = NumFactory(2) for m in dir(f): mthd...
What gets printed? ```python def addItem(listParam): listParam += [1] mylist = [1, 2, 3, 4] addItem(mylist) print(len(mylist)) ```