for solving above problem I normally use for loop like that:
list1 = ['1', '2', 3,32423,5.76, "afef"]
list2 = []
for ele in list1:
list2.append(str(ele))
does python has some build in function for solving that problem?
You can use the built-in function map like the following:
list1 = ['1', '2', 3, 32423, 5.76, "afef"]
list2 = list(map(str, list1))
list1 contains numbers like 3, 32423, 5.76, but list2 contains only strings. list1 == ['1', '2', 3, 32423, 5.76, 'afef'] while list2 == ['1', '2', '3', '32423', '5.76', 'afef'].
list comprehensionseg[str(i) for i in list1]