LoginSignup
0
0

ord()とは

Posted at

ord()とは

ord()とはPythonの組み込み関数で、特定の一文字に対応するUnicodeコードポイントを返します。
以下に例を示します。

sampe.py
s = "A"
print(ord(s))  # 出力: 65

s = ""
print(ord(s))  # 出力: 12354

この例では、最初の文字"A"のUnicodeコードポイントは65で、二つ目の文字"あ"のUnicodeコードポイントは12354です。

0
0
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
0
0