1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Python ユニコード絵文字のインクリメント

Posted at

メモ

# 1
print('1⃣')
print('2⃣')
print('3⃣')
print('4⃣')

# 2 囲み文字のインクリメント (囲み数字は2文字使ってる)
for i in range(1,5):
    print(f'{i}\N{combining enclosing keycap}')

# 3 アルファベットのインクリメント
for i in range(4):
    print(chr(ord('🇦') + i))

# 2の内包表記
[print(f'{i}\N{combining enclosing keycap}') for i in range(1,5)]

# 3の内包表記
[print(chr(ord('🇦') + i)) for i in range(4)]
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?