LoginSignup
1
0

More than 3 years have passed since last update.

python 変数を日本語で定義

Posted at

環境

Python 3.9.1
win 10

コード

import random
def (数字: list[int]) -> list[int]:
    数字配列の長さ = len(数字)
    for  in range(数字配列の長さ):
        for  in range(数字配列の長さ - 1 - ):
            if 数字[] > 数字[ + 1]:
                数字[], 数字[ + 1] = 数字[ + 1], 数字[]

    return 数字




数字 = [random.randint(0, 1000) for  in range(10)]
print(数字)
print((数字))

問題なく実行できてる

[947, 894, 661, 501, 138, 85, 518, 352, 297, 557]
[85, 138, 297, 352, 501, 518, 557, 661, 894, 947]

英語に慣れてるせいか日本語読みずらい

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