If i have this as my code:
import sys
from sys import argv
if len(sys.argv) == 7:
a,b,c,d,e,f,g = argv
c_list = c.split(',')
d_list = d.split(',')
if len(c_list) == len(d_list):
print b
elif len(d_list) == len(c_list):
print b
else:
sys.exit()
for c in c_list:
if len(c_list) == len(d_list):
print c
else:
sys.exit()
for d in d_list:
if len(d_list) == len(c_list):
print d
else:
sys.exit()
print e
print f
print g
else:
a,b,c,d,e,f = argv
c_list = c.split(',')
d_list = d.split(',')
if len(c_list) == len(d_list):
print b
elif len(d_list) == len(c_list):
print b
else:
sys.exit()
for c in c_list:
if len(c_list) == len(d_list):
print c
else:
sys.exit()
for d in d_list:
if len(d_list) == len(c_list):
print d
else:
sys.exit()
print e
print f
It allows me to pass the following to argv:
a b c,c1,c2 d,d1,d2 e f g
and the other code I have leads to this list printing as
a
b
c
c1
c2
d
d1
d2
e
f
g
However, I want it to print the following:
a
b
c
d
e
f
g
a
b
c1
d1
e
f
g
and so on and so forth. How would I do this? If this seems super basic, I apologize. As a high school freshman, I am still trying to figure out how the complex world of coding works.