我想你想要这样的东西:
int_list = [2, 33, 4, 55, 5, 56, 34, 6, 6, 76, 78657, 234, 3, 4]
New = []
for N in int_list:
New.append(str(N) + ('small' if N < 30 else 'large'))
print(New)
结果:
['2small', '33large', '4small', '55large', '5small', '56large', '34large', '6small', '6small', '76large', '78657large', '234large', '3small', '4small']