Home
Sign Up
Sign In
SilverBullet's recent timeline updates
SilverBullet
V2EX member #338570, joined on 2018-08-05 00:18:22 +08:00
SilverBullet
提问
技术话题
好玩
工作信息
交易信息
城市相关
SilverBullet's recent replies
Aug 5, 2018
Replied to a topic by
Laccuse
›
Python
›
请问 Python 如何实现两个数字一行,三个数字一行交替输出?
用 numpy 非常简单。
```python
import numpy as np
data = np.arange(1000,10000)
data = data[(data%3 == 0) * (data%6 != 0)].reshape(-1, 5)
[print('{} {}\n{} {} {}'.format(*row)) for row in data]
```
»
More replies by SilverBullet
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Solana
·
5354 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 18ms ·
UTC 07:54
·
PVG 15:54
·
LAX 00:54
·
JFK 03:54
♥ Do have faith in what you're doing.
❯