Simple Python script to encode or decode URLs