comment

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

関連記事

no image

unixターミナルでストレージのファイル使用量を表示する方法

unix では、du コマンドを使ってファイルの容量を表示することができる。 h (human readable)のオプションを使うと、キロバイト・メガバイト等 人間に読みやすい表示をしてくれる。 d …

no image

python3 で、文字列を一文字ずつのリストに変換する方法

string を list() で変換すれば良い。 例 str1 = ‘Good morning.’ list1 = list(str1) print(list1) 結果 [‘G’, ‘o’, ‘o’ …

no image

python3 で、ファイルの文字列の1行目を出力する

ファイルを読み込んで、1行目だけをコンソールに出力するには readlines() を使う。 例 f = open(“data.txt”) lines = f.readlines() print(li …

no image

c言語 ターミナル上で出力した文字列の表示を初期化する

エスケープシーケンス \033[2J と\033[u を使う。 例 #include <unistd.h> #include <stdio.h> int main() { in …

no image

tex でπ積(総乗、乗積)を表示する方法

tex で大文字のπ(Π)を使って乗積を表示する方法 例 $\displaystyle \prod_{i=0}^{N} a_i$または$\prod_{i=0}^{N} a_i$ 結果 このお姉さんはフ …