# -*- coding: utf-8 -*-
"""
Created on Tue Dec 03 15:55:36 2013

@author: olenag
"""

import os

for fn in os.listdir("."):
    if fn.find("_cost0_") > 0:
        newfn = fn.replace("_cost0_","_")
        os.rename(fn,newfn)

#[os.rename(f, f.replace('_', '-')) for f in os.listdir('.') if not f.startswith('.')]
d15dee93138f7f6690fb55a8697b053bc15dd84b
<mask token>

<mask token>
for fn in os.listdir('.'):
    if fn.find('_cost0_') > 0:
        newfn = fn.replace('_cost0_', '_')
        os.rename(fn, newfn)

<mask token>
import os
for fn in os.listdir('.'):
    if fn.find('_cost0_') > 0:
        newfn = fn.replace('_cost0_', '_')
        os.rename(fn, newfn)

# -*- coding: utf-8 -*-
"""
Created on Tue Dec 03 15:55:36 2013

@author: olenag
"""

import os

for fn in os.listdir("."):
    if fn.find("_cost0_") > 0:
        newfn = fn.replace("_cost0_","_")
        os.rename(fn,newfn)

#[os.rename(f, f.replace('_', '-')) for f in os.listdir('.') if not f.startswith('.')]