Source Code:
(back to article)
original_list = [['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9']] converted_list = [[int(string) for string in sublist] for sublist in original_list] print(converted_list) # Output: [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
Result:
Report an issue