I am new to python and I am struggling with encoding
I have a list of String like this:
keys = ["u'part-00000-6edc0ee4-de74-4f82-9f8c-b4c965896224-c000.csv'",
" u'part-00001-6edc0ee4-de74-4f82-9f8c-b4c965896224-c000.csv'"]
I do this to encode
keys = [x.encode('UTF-8') for x in keys]
However I am getting "b" appended, the result being
[b"u'part-00000-6edc0ee4-de74-4f82-9f8c-b4c965896224-c000.csv'",
b" u'part-00001-6edc0ee4-de74-4f82-9f8c-b4c965896224-c000.csv'"]
I thought it would be simpler to just encode with utf-8
What am I doing wrong?