foo = []
a = foo.append(raw_input('Type anything.\n'))
b = raw_input('Another questions? Y/N\n')
while b != 'N':
b = foo.append(raw_input('Type and to continue, N for stop\n'))
if b == 'N': break
print foo
a = raw_input('Type anything.\n')
foo = [a]
b = raw_input('Another questions? Y/N\n')
while b != 'N':
b = raw_input('Type and to continue, N for stop\n')
if b == 'N': break
foo.append(b)
foo = []
a = raw_input('Type anything.\n')
foo.append(a)
b = raw_input('Another questions? Y/N\n')
while b != 'N':
b = raw_input('Type and to continue, N for stop\n')
if b == 'N': break
foo.append(raw_input)
print foo
在列表.追加不返回。在
这就是方法
{cd1>添加到最后一个元素的检查:
相关问题 更多 >
编程相关推荐