Joining Strings
Emeka
emekamicro at gmail.com
Wed Apr 6 18:25:08 EDT 2016
Hello All,
import urllib.request
import re
url = 'https://www.everyday.com/
req = urllib.request.Request(url)
resp = urllib.request.urlopen(req)
respData = resp.read()
paragraphs = re.findall(r'\[(.*?)\]',str(respData))
for eachP in paragraphs:
print("".join(eachP.split(',')[1:-2]))
print("\n")
I got the below:
"Coke - Yala Market Branch""NO. 113 IKU BAKR WAY YALA"""
But what I need is
'Coke - Yala Market Branch NO. 113 IKU BAKR WAY YALA'
How to I achieve the above?
Regards Janus
--
P.S Please join our groups*: *nigeriaarduinogroup at googlegroups.com
* or *jifunze-kufikiria at googlegroups.com These are platforms for learning
and sharing of knowledge.
www.satajanus.com | *Satajanus Nig.
Ltd*
More information about the Python-list
mailing list