回答編集履歴
1
追記
answer
CHANGED
@@ -1,3 +1,8 @@
|
|
1
1
|
文字列中に`\`が存在するために、特殊な文字が紛れ込んでいると勘違いされているのです。
|
2
2
|
Windowsのパスを扱う際は、次のようにraw文字列として扱うと便利です。
|
3
|
-
`r"C:\X\XX\XXX\CT_JPG_IR6a.dcm"`
|
3
|
+
`r"C:\X\XX\XXX\CT_JPG_IR6a.dcm"`
|
4
|
+
|
5
|
+
---
|
6
|
+
情報が古いのが難点ですが、いちおう初心者向けの説明のリンクを貼っておきます。
|
7
|
+
- [PythonWeb - エスケープシーケンス](https://www.pythonweb.jp/tutorial/string/index2.html)
|
8
|
+
- [PythonWeb - raw文字列](https://www.pythonweb.jp/tutorial/string/index4.html)
|