comment

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

関連記事

no image

tex で図の番号を表示しない方法

caption パッケージを使っておき、\caption* を使うと、図の番号を表示しないようにできる。 例 \usepackage{caption} \begin{document} \begin{ …

no image

python3 でカンマの入った数値の文字列を数値に変換する方法

replace と int 変換を組み合わせる。 例 str1 = ‘1,234,567’ int1 = int(str1.replace(‘,’,”)) print(int1) 結果 123456 …

no image

tex で期待値記号を入力する方法

\mathbf を使う。 例 $\mathbf{E}(\xi)$ 結果

no image

python3 で、文字列の末尾の文字を削除する方法

[:-1] で、最後の文字を取り除いた文字列を取得することができる。 例 str1 = “こんにちは。” result = str1[:-1] print(result) 結果 こんにちは

no image

python3 で文字列を区切り文字を指定してリストに変換する方法

split メソッドを使う。 例 str1 = ‘this, is, a, pen’ str2 = str1.split(‘,’) print(str2) 結果 [‘this’, ‘ is’, ‘ a …