Python Forum
Dictionaries homework
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dictionaries homework
#2
pythoncrazy1 Wrote:lst.remove(word)
It's usually not a good idea to remove items from a list while you're iterating on that list with a for loop.
pythoncrazy1 Wrote:break
Are you going to exit the loop the first time you meet a word which opposite is not in the list?
Reply


Messages In This Thread
Dictionaries homework - by pythoncrazy1 - Dec-11-2018, 03:39 PM
RE: Dictionaries homework - by Gribouillis - Dec-11-2018, 03:55 PM
RE: Dictionaries homework - by pythoncrazy1 - Dec-11-2018, 04:02 PM
RE: Dictionaries homework - by nilamo - Dec-11-2018, 08:42 PM
RE: Dictionaries homework - by ichabod801 - Dec-11-2018, 09:48 PM
RE: Dictionaries homework - by pythoncrazy1 - Dec-11-2018, 10:35 PM
RE: Dictionaries homework - by nilamo - Dec-11-2018, 10:42 PM
RE: Dictionaries homework - by ichabod801 - Dec-12-2018, 12:25 AM
RE: Dictionaries homework - by pythoncrazy1 - Dec-12-2018, 11:31 PM

Forum Jump:

User Panel Messages

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