Your code is likely getting the error because of this line:
for i in list1[i][i]:
...
It is not clear what the value of i is when evaluating list[i][i], but it would not work regardless, because what you would like to do is looping through your main list and also within each of its elements, which are also lists.
While you could figure this out with explicit indexing, Python offers you a better approach, namely looping through the elements directly.
Most importantly, in general, your regular expression approach would not be working because:
re.sub('x', ', ', list1[0][0])
is actually producing a string, which when printed, looks identical to the way Python would print a list of numbers, but it is not a list of numbers!
What you want to do instead is to convert your string to a numeric type.
If all you need is a list of floats, then just casting a valid text representation of a float would do the trick e.g. float('1.5') == 1.5. The same would hold for int, e.g. int('432') == 432 (but int('1.5') will raise a ValueError).
If you want to have different objects for ints and floats, as your expected output indicates, you could just first try to convert to int and if that fails, convert to float:
def to_number(value):
try:
value = int(value)
except ValueError:
value = float(value)
finally:
return value
With this in mind, you now need to make sure that the input of that function is going to be a string with a number.
Obviously, 1x2 or even 1, 2 are not, i.e. both int('1x2') and int('1, 2') (or with float instead of int) would rise a ValueError.
However, Python offers a simple way of parsing (well, splitting) that string in such a way that you would get '1' and '2' in a list:
'1x2'.split('x') == ['1', '2']
This also has the rather benign behavior of gracefully producing a consistent output even if you apply this to a text not containing the char to split, e.g.:
'1'.split('x') == ['1']
With all this building blocks, it is now possible to craft a sensible solution (making heavy use of list comprehensions):
list2 = [
[to_number(x) for elem in inner_list for x in elem.split('x')]
for inner_list in list1]
print(list2)
# [[2.6, 3.65], [], [2, 2.9, 1.7, 2.5, 1.3]]
(EDIT: added a number of explanations and wrote the code fully as list comprehensions).