I am new here and also fairly new to programming. I recently started learning Python to learn how to automate processes in my everyday tasks.
I am working with comparing 2 lists that I created from converting 2 columns from 2 Excel files into lists. The lists mainly contain numbers, but some items contain both integers and letters, and this I believe results in becoming a string rather than an integer. I would like to convert the letters into numbers to have a list of integers to be able to manipulate, compare, etc. Is there any way I can do this? I have been using openpyxl to access my Excel files. Below is an example of what I would like to do.
Ex: input
list1 = [8635, 6227, '8651FRT', '8651BK','8295INSERT', 8295]
output
newlist1 = [8635, 6227, 865101, 865102,829503, 8295]
I would like to replace 'FRT' with 01, 'BK' with 02, and 'INSERT' with 03. I would really appreciate the help. Thanks.