Re-translate the Japanese version (#1871)

* Retranslate Japanese docs with GPT-5.4

* Retranslate Japanese code with GPT-5.4
This commit is contained in:
Yudong Jin
2026-03-30 07:30:15 +08:00
committed by GitHub
parent fe6443235b
commit d7b2277d2b
1444 changed files with 83312 additions and 8363 deletions
@@ -6,8 +6,8 @@ Author: Peng Chen (pengchzn@gmail.com)
"""Driver Code"""
if __name__ == "__main__":
# スタックを初期化
# Pythonには組み込みのスタッククラスはありませんが、リストをスタックとして使用できます
# スタックを初期化する
# Python には組み込みのスタッククラスがないため、list をスタックとして使える
stack: list[int] = []
# 要素をプッシュ
@@ -18,14 +18,14 @@ if __name__ == "__main__":
stack.append(4)
print("スタック stack =", stack)
# スタックトップ要素にアクセス
# スタックトップ要素にアクセス
peek: int = stack[-1]
print("スタックトップ要素 peek =", peek)
# 要素をポップ
pop: int = stack.pop()
print("ポップされた要素 pop =", pop)
print("ポップ後のスタック =", stack)
print("ポップた要素 pop =", pop)
print("ポップ後 stack =", stack)
# スタックの長さを取得
size: int = len(stack)
@@ -33,4 +33,4 @@ if __name__ == "__main__":
# 空かどうかを判定
is_empty: bool = len(stack) == 0
print("スタックが空かどうか =", is_empty)
print("スタックが空かどうか =", is_empty)