我希望将列表中的所有元素乘以数字.我知道其他方法,但我想知道为什么这不起作用?我得到了与输出完全相同的列表.
lst = eval(input('enter a list')) for num in lst: num = num * 2 print(lst)
python
python ×1