def solution(files):
new_files = {i:[] for i in files}
num = [str(i) for i in range(10)] #["0","1",....,"9"]
for file in files:
a = [] ; turn = 0
ff = file.lower()
j = ''
for f in range(len(ff)):
if ff[f] not in num:
j += ff[f]
else:
a.append(j)
j = ''
break
# 숫자가 하나 이상 있으므로 항상 분리될 것임
for nf in range(f,len(ff)):
if ff[nf] in num:
j += ff[nf]
if nf == len(ff)-1:
a.append(int(j))
left = 0
else:
a.append(int(j))
left = 1
break
if left == 1:
a.append(ff[nf:])
new_files[file] = a
new_files = sorted(new_files.items(), key=lambda x:(x[1][0],x[1][1]))
new_files = dict(new_files)
return list(new_files.keys())