カレントディレクトリでのファイル内パス置換
../
を../../
にする
find . -type f -print0 | xargs -0 sed -i -e "s/\.\.\//\.\.\/\.\.\//g"
カレントディレクトリでのファイル内パス置換
../
を../../
にする
find . -type f -print0 | xargs -0 sed -i -e "s/\.\.\//\.\.\/\.\.\//g"
リストは「mutable」であり、タプルの中に格納できる。
>>> ([1], [2], [4]) ([1], [2], [4])
python - Remove all occurrences of a value from a list? - Stack Overflow
remove()
は指定したものを最初の1つだけ削除
>>> x = [1, 2, 3, 4, 2, 2, 3] >>> x.remove(2) >>> x [1, 3, 4, 2, 2, 3]
なので、2
は全部消されないよ。
(1,3,5) < (1,2,3,4)
これはFalse
1 3 5 1 2 3 4 ↑ ↑ ↑ ↑ (1)(2)(3)(4) こんな順で左から比較してると思う。
なので、(2)の瞬間に(1,3,5)
が勝った。なのでFlase