Split a list into a dictionary
First of all there is a bug in your code, range(0, n, slice+1) should be range(0, n, slice) otherwise you'll miss every (slice+1)th item.
I don't understand why you re-assigned l = file_list to l here, note that simple assignments in Python don't create a copy of the object. Also don't use l as a variable name because it looks like 1(one) in many fonts.
If you're using Python 2 then use xrange() instead of range().
dict(zip(range(1,num_keys+1),vals)) can be replace with a simpler dict(enumerate(vals, start=1))
The parenthesis around (dict) in return statement are unnecessary.
slice is a built-in function, so try not to use it as a variable name. slice_size is one alternative.


Also I don't understand why you need a dict here, you can simply use a list of lists. Then the only difference will be that you'll have to start indexing at 0. Indexing is very faster than dictionary key-lookups and will also make sure the order of items is maintained.