Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in Python by (1.6k points)

I am trying to urlencode this string before I submit.

queryString = 'eventName=' + evt.fields["eventName"] + '&' + 'eventDescription=' + evt.fields["eventDescription"]; 

1 Answer

0 votes
by (25.1k points)

Just create a dictionary with your parameters to be encoded in the urlencode function of urrlib module. e.g:

For python 2: 

import urllib

d = {'a': 'b', 'c': 'd'};


For Python 3

import urllib

d = {'a': 'b', 'c': 'd'};


Related questions

Browse Categories