用 Google Collab 跑即时 python

in cn •  3 months ago

googlecollab_icon.png

假设你马上想要用一个python 的直译器,又不想安装任何东西, 就可以用 Google Collab ,里头有 python2,python3 任你选。

首先,去 google drive , 然后新文件 new > more > Colaboratory ,
新的 collab notebook 就会被创建。

googlecollab_new.jpeg

然后就可以选你要用 python2 还是python3

googlecollab_new_notebook.png

而且, 里面可以有很多不同的code segment , 每个可以各别执行。

googlecollab_cell.png


而且可以 import 很多常用的library , 例如 ssl, http.client, json 等等。。。
以下是使用google collab 里的python3 去拿binance 的报价例子。

googlecollab.png

是不是很好玩呢。
谢谢阅读。

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

You got a 59.97% upvote from @mitsuko courtesy of @tensaix2j!

你那里天气如何?还在发愁自己的好文没人发现,收益惨淡吗?记得加上cn-curation标签,让飞鸽传书 帮你走出困境吧!倘若你想让我隐形,请回复“取消”。

You got a 83.33% upvote from @ptbot courtesy of @tensaix2j!
Delegate STEEM POWER and start earning 100% daily payouts ( no commission ).
Visit https://ptbot.ga for details.

You got a 2.93% upvote from @oceanwhale With 35+ Bonus Upvotes courtesy of @tensaix2j! Earn 100% earning payout by delegating SP to @oceanwhale. Visit www.OceanWhaleBot.com for details!

You have gotten a vote courtesy of @tensaix2j!
They have enlisted the help of the @alliedforces!
We gladly answer your call!
(@alliedforces is a collaboration of witnesses @jatinhota & @enginewitty)
Have you supported your favorite witnesses?

You received a 18.16% upvote from @brotherhood thanks to @tensaix2j!,
join on @brotherhood community on discord channel:https://discord.gg/3HZdaGk and share your post there.