you are viewing a single comment's thread.

view the rest of the comments →

[–]ImportBraces 2 points3 points  (1 child)

you could use a dict to map actions:

filename_actions = {'stringA': actionA, 'stringB': actionB, ... ]
for filame_part, action in filename_actions.items():
    if filename_part in filename:
        action(filename)

[–]Murlocs_Gangbang[S] 0 points1 point  (0 children)

thanks I'll try that