3.14 π day, so try to output in Python

Preface

The following theme was posted to the laboratory OB group of Facebook's technical college era.

"Now I need a drink, alcoholic of course, after the heavy lectures involving quantum mechanics."If you count the number of characters in each word in the sentence, it is the pi.

Since JavaScript and Ruby have already been registered, I tried my best with Python. It wasn't the size that I could put on Twitter, so I'll write it on Qiita.

One liner

There is no need to explain, so one liner.

$ python -c "import re; print map(len, re.compile('[a-z]+', re.I).findall('Now I need a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.'));"

version

python --version
Python 2.7.8

Recommended Posts

3.14 π day, so try to output in Python
Try to calculate Trace in Python
Try logging in to qiita with Python
First steps to try Google CloudVision in Python
Try to implement Oni Maitsuji Miserable in python
Try auto to automatically price Enums in Python 3.6
Try to calculate RPN in Python (for beginners)
Try gRPC in Python
Japanese output in Python
How to output "Ketsumaimo" as standard output in Python
Try 9 slices in Python
Try to make a Python module in C language
Try to improve your own intro quiz in Python
[Python] How to output the list values in order
To flush stdout in Python
Try to understand Python self
Try Python output with Haxe 3.2
Login to website in Python
Try LINE Notify in Python
Speech to speech in python [text to speech]
Try implementing Yubaba in Python 3
How to develop in Python
Read Fortran output in python
Post to Slack in Python
Try to make it using GUI and PyQt in Python
Output "Draw ferns programmatically" to the drawing process in Python
Change the standard output destination to a file in Python
It's Halloween so I'll try to hide it with Python
Just try to receive a webhook in ngrok and python
[Python] How to do PCA in Python
Output 2017 Premium Friday list in Python
[Introduction to Python3 Day 1] Programming and Python
Convert markdown to PDF in Python
How to collect images in Python
Try to operate Facebook with Python
[Introduction to Python3 Day 13] Chapter 7 Strings (7.1-7.1.1.1)
Try implementing extension method in python
How to use SQLite in Python
Output to csv file with Python
Try using LevelDB in Python (plyvel)
Let's try Fizz Buzz in Python
In the python command python points to python3.8
[Introduction to Python3 Day 14] Chapter 7 Strings (7.1.1.1 to 7.1.1.4)
Make standard output non-blocking in Python
Try PLC register access in Python
Try to put data in MongoDB
[Introduction to Python3 Day 15] Chapter 7 Strings (7.1.2-7.1.2.2)
Try converting cloudmonkey CLI to python3 -1
How to use Mysql in python
How to wrap C in Python
How to use ChemSpider in Python
6 ways to string objects in Python
How to use PubChem in Python
Export and output files in Python
Cython to try in the shortest
Try to output audio with M5STACK
Try using Leap Motion in Python
How to handle Japanese in Python
An alternative to `pause` in Python
[Introduction to Python3 Day 21] Chapter 10 System (10.1 to 10.5)
Try to get a list of breaking news threads in Python.