I am trying to fetch the list of students to get the integers from an array.
Input:
list=['table_name_student_1', 'table_name_student_20', 'table_name_student_300', 'table_name_student_4500']
Expected Output: [1,20,300,4500]
I tried the split()
function but I am not able to use it in a list.
table_name = 'table_name_student_12345'
id = table_name.split('_')
print(id) -- #Output: 12345