Moving or copying images from a flat directory to subdirectories
This looks pretty decent for a first Python program, so good job on that.

I only have a few small nitpicks


Some PEP8 violations, but nothing major


There should be a &lt;space&gt; after the ,
Line too long (max 79)

Consider making the directory paths global constants

PEP8 reference

PICTURES_PATH = "C:\\temp\\picturepy\\pictures\\"
GALLERIES_PATH = "C:\\temp\\picturepy\\galleries\\"

I think whatif could have a better name

What if what? It's not really clear what this variable is supposed to do

Maybe rename it to keep_original, because the copy will leave the original intact
Possible to do the if else in one line with unpacking


do = shutil.copyfile if whatif else shutil.move
verb = "copied" if whatif else "moved"



Would become

do, verb = (shutil.copyfile, "copied") if keep_original else (shutil.move, "moved")