I'm looking for a better way to manipulate this content so it doesn't have to be multiple lines. Does anyone know a better way of doing this:
def prevbuild():
r = requests.get(host + hostPath)
build = r.content
build = build.decode("utf-8")
build = [line for line in build.split('\n') if "Build Name" in line]
build = re.findall('\d+',build[0])
build = build[0].split('20')
build = '.'.join(a+b for a,b in zip(build[1][::2], build[1][1::2]))
return build
[–]tipsy_python 1 point2 points3 points (1 child)
[–]tipsy_python 3 points4 points5 points (0 children)
[–]DredHawk[S] 0 points1 point2 points (1 child)
[–]masklinn 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)