I have the following list, each element of which is of type string:
{"abc", "def","2","ghi","7"}
Is there an efficient way to arrive at:
{"abcdef", 2,"ghi",7}
where adjacent alphabetic elements are combined and string representations of integers are converted to Integer type?
ToExpression obtains the integers all right, but the alphabetic strings are converted to Symbols and the string manipulation functions can't be used.
I would be grateful for any suggestions.
"abc"
and"def"
are supposed to be merged. Twice I tried to offer solutions that did not do this critical step. $\endgroup$