其中一種
myInputs = input('請輸入a1,a2,a3\n')
for myinput in myInputs.split(','):
print(myinput.strip())
a = list()
a.append(input("請輸入變數"))
while True:
b = input()
if b == "":
break
else:
a.append(b)