Python Error 123 The filename, directory name, or volume label syntax is incorrect
<p>I am trying to make directory using os.mkdir in python
<br>It works fine when path is <code>D:\screenshots\data</code></p>

<pre><code>os.mkdir("D:\screenshots\data")
</code></pre>

<p>but it gives error when path is <code>D:\screenshots\subs:air.com.freshplanet.games.MoviePop:moviepop.vip.1month</code></p>

<pre><code>os.mkdir("D:\screenshots\subs:air.com.freshplanet.games.MoviePop:moviepop.vip.1month")
[Error 123] The filename, directory name, or volume label syntax is incorrect: 'D:\\screenshots\\subs:air.com.freshplanet.games.MoviePop:moviepop.vip.1month'
</code></pre>

<p>I don't know why it is giving this error</p>