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

Python: How to change dictionary entry

Python: How to change dictionary entry

# Define a dictionary
con_str = {"host":"", "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:

  • changing key value pairs data in python
  • python dictionary modify entry
  • changing dictionary keys python
  • python change entry in dictionary
  • python dictionary change
  • how to change key pair in dictionary in python
  • how to replace an entry in a dictionary in python
  • python changing entries in dictionaries
  • python change working dictionairy
  • how to change key in dictionaryentry

No comments yet.

Leave a Comment