In Python 2.7.10, put quotes around information from a CSV file to be used in a Google search -


my program takes first , last name csv file row , puts google search argument along word. search becomes: john doe teacher be: "john doe" + teacher how can quotes , + sign? thanks!

just try + or join method of string:

>>> name = "john doe" >>> deal_name = '"' + name + '" + ' + 'teacher' >>> print deal_name "john doe" + teacher >>> or_deal_name = ''.join(['"',name,'" + ','teacher']) >>> print or_deal_name "john doe" + teacher 

Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -