Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: dict elements are sometimes treated as List and sometimes as String
Post: RE: dict elements are sometimes treated as List an...

(Mar-30-2020, 01:16 AM)deanhystad Wrote: If you want the dictionary to contain lists you need to add lists. "coat" is a string. ["coat"] is a list that contains a string. You can append to a list ...
phython_mdr General Coding Help 4 2,722 Apr-01-2020, 12:47 PM
    Thread: dict elements are sometimes treated as List and sometimes as String
Post: RE: dict elements are sometimes treated as List an...

Hi Buran Thanks for helping. Here's the snippet and the error message words2 = dict() token: str ="acto" words2[token]="coat" words2[token].append("taco") #Line 16Traceback (most recent call last): ...
phython_mdr General Coding Help 4 2,722 Mar-30-2020, 12:55 AM
    Thread: dict elements are sometimes treated as List and sometimes as String
Post: dict elements are sometimes treated as List and so...

I'm just learning Python by developing an anagram finder. After a bit of debugging it seems that if I check "if token not in words" then the words dictionary treats its elements as List items. But i...
phython_mdr General Coding Help 4 2,722 Mar-29-2020, 05:06 PM

User Panel Messages

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