- python 3.5 (aistudio) 里用 f-string
try: from ww import f except ImportError: !pip install ww finally: from ww import f a = 10 print(f('a={a}'))
- jupyter cell magic
- %env 不可留空格
- %%bash: 必须置于 cell 的第一行,后面可跟多条 bash 指令
- python 变量用于jupyter 的 bash [1]:“$varname”, 例如
filename = ‘afile’ ! ls "$afile"
[1]:https://blog.dominodatalab.com/lesser-known-ways-of-using-notebooks/