Question: I'm trying following example :

`python -c "import sys; print sys.argv[1]" "test\ntest"`

Output :

```
test\ntest

```

But I want following 

```
test 
test

```

Update 1#
As @devnull suggested can solve the problem if user itself pass the with `$` but how about python should take care of this ?

I've tried :

```
python -c "import sys; print '$' + sys.argv[1]" 'test\ntest'

```

but output :

```
$test\ntest

```

Answer: 
As deed02392 mentioned, shell sends the characters literally, so python "escapes" the backslash internally. To see what I mean, try

```
python -c "import sys; print repr(sys.argv[1])" "test\ntest"
'test\\ntest'

```

To work around this, do:

```
python -c "import sys; print sys.argv[1].decode('string_escape')" "test\ntest"
test
test

```
Tell the shell to pass what you want to see:

```
python -c "import sys; print sys.argv[1]" $'test\ntest'

```

This would produce:

```
test
test

```

The `$'string'` syntax is referred to as [ANSI-C Quoting](http://www.gnu.org/software/bash/manual/bashref.html#ANSI_002dC-Quoting).

---

Another way would be to tell the shell to interpret your *original* output:

```
python -c "import sys; print sys.argv[1]" 'test\ntest' | xargs -0 echo -en

```

This would also produce:

```
test
test

```