Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset
Comments Off

Python: How to change dictionary entry

Your ads will be inserted here by

Easy AdSense.

Please go to the plugin admin page to paste your ad code.

Python: How to change dictionary entry
{filelink=15993}

# Define a dictionary
con_str = {"host":"127.0.0.1", "database":"mysql", "user":"root", "pwd":"mysql"}
print con_str
# update entry
con_str['host'] = 'localhost'
# print new values
print con_str

Users who found this page were searching for:

  • how to edit an entry in dictionary in python
  • changing key value pairs data in python
  • python change value of dictionary key
  • change entry in a dictionary python 2.7
  • python change value in dictionary
  • python changing dict entery
  • replace values in a dictionary with new values in python
  • how to edit and dictionary entry python
  • python change dictionary
  • how to replace an entry in a dictionary in python

No comments yet.

Leave a Comment

Switch to our mobile site