if __name__ == '__main__':
file ='ABC_BC_BCD__1ABC_20210930A095512_20210930A095522_033123_03E123_AABC_GUOQIN'
# Intercept
# Split File name
splieFile = file.split("_")
length = len(splieFile)
print(length)
index = ''
# Traverse
for i in range(length):
if( i == 6):
continue
index += splieFile[i] + "_"
str_len = len(index)
# Intercept
index = index[0:str_len-1]
# Print
print(index)
Source file length :ABC_BC_BCD__1ABC_20210930A095512_20210930A095522_033123_03E123_AABC_GUOQIN