Q:

Removing the parentheses from the values of the dictionary when printing

I have the following function where I would like to generate a dictionary based on the number of parameters introduced: 
def find_posit(*param):
    query = {'colors':param}
    return query

print(find_posit('red','blue','green'))

When printing the function, the returned output is something like this:
{'colors':('red','blue','green')}

How could I obtain the following output?
 {'colors': 'red','blue','green'}

A:

The short answer is that you can't. That's just the way Python defines the __repr__()esentation for tuple objects.
However, you could create a custom function to "stringify" the dictionary in the representation that you want:
>>> def print_custom_dict(d):
    pairs = []
    for k, v in d.items():
            pair = '{}: {}'.format(repr(k), ','.join(repr(val) for val in v))
            pairs.append(pair)
    return '{%s}' % ', '.join(pairs)

>>> print_custom_dict({'colors':('red', 'blue', 'green')})
"{'colors': 'red','blue','green'}"

Of course, there are others options you could take such as defining a custom tuple-ish object, and modifying the __repr__() of it to print the desired output, but in your case using a simple helper function IMO is the simplest and cleanest method.

