How can I append URLs to a array in python, I was trying using the following code,
zone = ["z1", "z2", "z3"]
result_1 = []
for i in zone:
result_val = os.system("gcloud command1 " +i+ " --command2")
result_1.append(result_val)
print(result_1)
But when run this, my results are printing like below,
https://sample-domain.com/test/abc/1
https://sample-domain.com/test/abc/2
https://sample-domain.com/test/abc/3
But when I print the "result_1" it shows me below result
[0, 0, 0]
But I need the result like this,
["https://sample-domain.com/test/abc/1","https://sample-domain.com/test/abc/2","https://sample-domain.com/test/abc/3"]
How can I correct this issue ?
Any help would be greatly appreciated.
Thanks.