Python convert– Convert string back to list
I am new into Python, and I have a question: I workworking at a "cloud server" for myself. I I have a tool to list files which are on the server.
flist = os.listdir("C:/Server")
conn.send(bytes("str(flist), "UTF-8"))
This sendsends a list atto the client, the client convertconverts it to a string. (something like this: [' Arcer.exe', 'Launcher.exe', 'Document.txt']) Now how can I convert the string back into a list?
string = "[' Arcer.exe', 'Launcher.exe', 'Document.txt']"
list = []
list = string.convert #pseudo method
print(list[0]) #Arcer.exe
print(list[1]) #Launcher.exe
Sorry for my bad English, I'm a German student
Python convert string back to list
I am new into Python, and I have a question: I work at a "cloud server" for myself. I have a tool to list files which are on the server.
flist = os.listdir("C:/Server")
conn.send(bytes("str(flist), "UTF-8"))
This send a list at the client, the client convert it to a string. (something like this: [' Arcer.exe', 'Launcher.exe', 'Document.txt']) Now how can I convert the string back into a list?
string = "[' Arcer.exe', 'Launcher.exe', 'Document.txt']"
list = []
list = string.convert #pseudo method
print(list[0]) #Arcer.exe
print(list[1]) #Launcher.exe
Sorry for my bad English, I'm a German student
Python – Convert string to list
I am working at a "cloud server" for myself. I have a tool to list files which are on the server.
flist = os.listdir("C:/Server")
conn.send(bytes("str(flist), "UTF-8"))
This sends a list to the client, the client converts it to a string. (something like this: [' Arcer.exe', 'Launcher.exe', 'Document.txt']) Now how can I convert the string back into a list?
string = "[' Arcer.exe', 'Launcher.exe', 'Document.txt']"
list = []
list = string.convert #pseudo method
print(list[0]) #Arcer.exe
print(list[1]) #Launcher.exe
Python convert string back to list
I am new into Python, and I have a question: I work at a "cloud server" for myself. I have a tool to list files which are on the server.
flist = os.listdir("C:/Server")
conn.send(bytes("str(flist), "UTF-8"))
This send a list at the client, the client convert it to a string. (something like this: [' Arcer.exe', 'Launcher.exe', 'Document.txt']) Now how can I convert the string back into a list?
string = "[' Arcer.exe', 'Launcher.exe', 'Document.txt']"
list = []
list = string.convert #pseudo method
print(list[0]) #Arcer.exe
print(list[1]) #Launcher.exe
Sorry for my bad English, I'm a German student