In Python 2.6, I need to create a string by combining INTRANET\ and userid, for example jDoe , to get the string INTRANET\jDoe . This line will be part of the SQL query. I tried this in several ways, but in the end I get INTRANET\\jDoe , and so my query returns no results.
I want to do this:
a = 'INTRANET\\' b = 'jDoe' c = a+b ### want to get c as 'INTRANET\jDoe', not 'INTRANET\\jDoe'
thanks
The problem seems a little different:
When I type c, I get "INTRANET \ jDoe". But when I add c to the list (which will be used in the sql query), as shown below:
list1 = [] list1.append(c) print list1 >>>['INTRANET\\jDoe']
Why is this?
sunny source share