Вероятно, вы ищете python s map
функцию:
oldlist = ['21', '6', '13', '6', '11', '5', '6', '10', '11', '11', '21', '17', '23', '10', '36', '4', '4', '7', '23', '6', '12', '2', '7', '5', '14', '3', '10', '5', '9', '43', '38']
newlist = list(map(int, oldlist))
print(type(newlist[0]))
print(newlist)
И вывод:
<class 'int'>
[21, 6, 13, 6, 11, 5, 6, 10, 11, 11, 21, 17, 23, 10, 36, 4, 4, 7, 23, 6, 12, 2, 7, 5, 14, 3, 10, 5, 9, 43, 38]