just felt like asking this as there are always jewels popping up on stackoverflow :)
What I have is the following list:
list1 = [['command','arg1','arg2'], ['command2','arg1'], ... ]
How would you recommend to transform it into a string in order to be passed as ONE GET argument?
e.g.
http://webgame_site.com/command_list/?data=...
What I am currently doing is separating lists using commas ,
;
, but I don't like this idea as the method would break if I decide to introduce these within strings.
I'm trying to be as compact as possible.
One idea I've had is to encode the list into base64:
[['command','arg1','arg2'], ['command2','arg1']]
=> "W1snY29tbWFuZCcsJ2FyZzEnLCdhcmcyJ10sWydjb21tYW5kMicsJ2FyZzEnXV0="
which is shorter than URIencode
Any ideas? :)