Python Syntax Error (Unicode error)
Question: [Click here to see screenshot](http://i.stack.imgur.com/Bg04E.jpg)

I am trying to convert a CSV to XLS using Python 3.5.1 I have attached a
picture to show the issue

    
    
    import csv, xlwt
    
    files = ["C:\Users\Office\Documents"]
    
    for i in files:
    f=open(i, 'rb')
    g = csv.reader ((f), delimiter=";")
    wbk= xlwt.Workbook()
    sheet = wbk.add_sheet("Sheet 1")
    
    for rowi, row in enumerate(g):
        for coli, value in enumerate(row):
            sheet.write(rowi,coli,value)
    
    wbk.save(i + '.xls')
    


Answer: Following [@KoebmandSTO's
advice](https://stackoverflow.com/questions/35906530/python-syntax-error-
unicode-error#comment59473494_35906530) you may want to [try
this](https://www.google.com/#q=\(unicode+error\)+%27unicodeescape%27).

you are using backslashes in the string that are normally used to escape
special characters like `\n`, to prevent this behaviour use `r"..."`:

    
    
    files = [r"C:\Users\Office\Documents"]
    

see [this answer](http://stackoverflow.com/questions/2081640/what-exactly-do-
u-and-r-string-flags-do-in-python-and-what-are-raw-string-l) for better
explanation on what the `r` does.

or backslash escape the backslash with `\\`:

    
    
    files = ["C:\\Users\\Office\\Documents"]
    

since the `\` is a special character that needs to be escaped.

