newurl = ['' for i in range(6)]
for i in range(3):
    newurl[i] = parsed[i]
for i in range(4, 6):
    newurl[i] = ''
print(urlparse.urlunparse(newurl))
URL parsing in Python - normalizing double-slash in paths