Skip to content

Instantly share code, notes, and snippets.

View javaboy-github's full-sized avatar
😇
Studying

javaboy-github

😇
Studying
  • Japan
View GitHub Profile
import random
numbers = list(range(1, 37))
while len(numbers) != 0:
for i in range(6):
e = random.choice(numbers) # 要素を取得
print("%2d" % e, end=" ") # 要素を表示
numbers.remove(e) # 要素を削除
if len(numbers) == 0:
@javaboy-github
javaboy-github / 演算子.md
Last active April 26, 2021 07:00
自作Pythonチートシート

数値

内容 記号
足し算 + 2 + 1
引き算 - 2 - 1
掛け算 * 2 * 3
割り算 / 6 / 3
累乗 ** 2 ** 3
上を切り捨てたあれ // 6 // 3
あまり % 10 % 3