I just wanted to ask about it, since stones always appear in stackoverflow :)
I have the following list:
list1 = [['command','arg1','arg2'], ['command2','arg1'], ... ]
How would you recommend converting it to a string to pass as an ONE GET argument?
eg.
http://webgame_site.com/command_list/?data=...
What I'm doing right now is separating the lists with commas , ;, but I don’t like this idea, because the method will break if I decide to enter them in strings.
I try to be as compact as possible.
One of my ideas is to encode the list in base64:
[['command','arg1','arg2'], ['command2','arg1']]
=> "W1snY29tbWFuZCcsJ2FyZzEnLCdhcmcyJ10sWydjb21tYW5kMicsJ2FyZzEnXV0="
which is less than URIencode
Any ideas? :)
source
share