Python ValueError: expected ':' after format specifier
<p>I'm using a dict in python in an attempt to replace words in a string with whatever is in the dict. When I try to run my code, however, it prints out the error "ValueError: expected ':' after format specifier."  I have no idea where this error might be coming from. Does anyone with more pythonic wisdom have any suggestions for me? 
Thanks! </p>

<p>Here's an example of my code:</p>

<pre><code>str = """{fruit}"""
dict = {"fruit":"pears"}
str.replace(**dict)
</code></pre>

<p>This should make str contain "pears". </p>

<p><strong>UPDATE</strong></p>

<p>I'm purposefully using the triple quoted strings - in my code I'm trying to do a replace with a multiline string, 
Also, my code is already using the .format method. I just decided to mix the words when translating it between my code to here. This is an updated version of my example code that isn't working. </p>

<pre><code>my_dict = """{fruit}"""
dict = {"fruit":"pears"}
string.format(**my_dict)
</code></pre>

<p><strong>FINAL UPDATE</strong> </p>

<p>Thanks for all of the answers I received below. I didn't do a good job of explaining my problem and decided to simplify it which simplified away my problem. I'm doing some meta programming so I was trying to replace within a C function definition and python was trying to use the "{" as a format identifier. I needed to use "{{" to get python to recognize the bracket as a char and not as some beginning to a format identifier.</p>