Feb-23-2018, 03:30 AM
(This post was last modified: Feb-23-2018, 03:30 AM by kannanv110.)
Below code will work well for whatever in between "-"
#!/usr/bin/python import glob from __future__ import print_function for fileName in glob.glob('CT-*'): fileName = fileName.split('-') fileName[1] = '008' fileName = '-'.join(fileName) print(fileName)