l = ['sample', 'test', 'hello']
string = 'watch '
output = [string + i for i in l]
print(output)
>>> ['watch sample', 'watch test', 'watch hello']
Note that I use l
rather than list
. In general you shouldn't overload built in terms like that.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…