Your functions are duplicates, you only need one to return the file names. I do not understand your question.
def video_game(game_dir='/SNES/SNES Roms', extensions=('.src','srm')):
return [file_name for file_name in os.listdir(game_dir) if data.endswith(extensions)]
pyTony
pyMod
6,312 posts since Apr 2010
Reputation Points: 879
Solved Threads: 987
Skill Endorsements: 26
Question Answered as of 3 Months Ago by
pyTony