Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Editing Dictionaries
#3
To add to what jcrater said, you can totally simplify your loop:

for Pair in (A, E, U):
    Pair['Bi'] = Pair + 'b'
    ...
Of course, you will get another error on Pair['Bi'] = Pair + 'b', because you are trying to add a dictionary to a string, which won't work. But it's not clear to me what you're expecting to happen there, so I'm not sure how to fix it.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
Editing Dictionaries - by Astrikor - Aug-14-2018, 10:02 AM
RE: Editing Dictionaries - by j.crater - Aug-14-2018, 10:09 AM
RE: Editing Dictionaries - by ichabod801 - Aug-14-2018, 12:27 PM
RE: Editing Dictionaries - by Astrikor - Aug-14-2018, 03:03 PM
RE: Editing Dictionaries - by ichabod801 - Aug-14-2018, 05:47 PM
RE: Editing Dictionaries - by Astrikor - Aug-15-2018, 01:43 PM
RE: Editing Dictionaries - by ichabod801 - Aug-15-2018, 02:00 PM
RE: Editing Dictionaries - by Astrikor - Aug-15-2018, 05:05 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Need help editing a PDF omar 4 1,248 Oct-22-2022, 08:52 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020