comment

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

関連記事

no image

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

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

no image

tex で差集合の記号を入力する方法

\setminus を使う。 例 $A \setminus B$ 結果

no image

tex で、集合の元でないことを表現する方法

\not \in を使う。 例 x \not \in A 結果

no image

matplotlib で、縦横の線(グリッド)を描く方法

pyplot grid で縦横線(罫線のようなもの)を引くことができる。 例 from matplotlib import pyplot as plt data_x = [25,26,27] …

no image

pythonで配列(リスト)の、ある要素がわかっているときにその次の要素を取得する方法。

next() を使う。 例 my_arr = [‘春’,’夏’,’秋’,’冬’] my_iter = iter(my_arr) print(next(my_iter,’なし’)) print(next …