Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Python: How to change dictionary entry

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 change key in dictionaryentry
  • python change dictionary key
  • changing key value pairs data in python
  • how to change key pair in dictionary in python
  • how to replace an entry in a dictionary in python
  • python change working dictionairy
  • python dictionary change
  • python changing entries in dictionaries
  • python change entry in dictionary
  • python how to update a dictionary entry

No comments yet.

Leave a Comment