Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dictionary and List
#2
I don't understand what you are trying to do. At all. The usual way to use a dictionary for a tic tac toe game is to number the squares from zero through 8, or 1 through 9, so those are the keys of a dictionary. The user selects a square number and the dictionary is updated with an X or O for that key (square number) . You can then check squares 1 ,2, 3 (and all of the other winning combinations) to see if they are all equal.
.
Reply


Messages In This Thread
Dictionary and List - by liewchaochein - Apr-15-2018, 10:06 AM
RE: Dictionary and List - by woooee - Apr-15-2018, 06:13 PM
RE: Dictionary and List - by liewchaochein - Apr-16-2018, 12:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Sort a list of dictionaries by the only dictionary key Calab 2 804 Apr-29-2024, 04:38 PM
Last Post: Calab
  Dictionary in a list bashage 2 716 Dec-27-2023, 04:04 PM
Last Post: deanhystad
  filtering a list of dictionary as per given criteria jss 5 908 Dec-23-2023, 08:47 AM
Last Post: Gribouillis
  How to add list to dictionary? Kull_Khan 3 1,170 Apr-04-2023, 08:35 AM
Last Post: ClaytonMorrison
  check if element is in a list in a dictionary value ambrozote 4 2,199 May-11-2022, 06:05 PM
Last Post: deanhystad
  Dictionary from a list failed, help needed leoahum 7 2,217 Apr-28-2022, 06:59 AM
Last Post: buran
  how to assign items from a list to a dictionary CompleteNewb 3 1,773 Mar-19-2022, 01:25 AM
Last Post: deanhystad
  Python, how to manage multiple data in list or dictionary with calculations and FIFO Mikeardy 8 2,855 Dec-31-2021, 07:47 AM
Last Post: Mikeardy
  Class-Aggregation and creating a list/dictionary IoannisDem 1 2,066 Oct-03-2021, 05:16 PM
Last Post: Yoriz
  Python dictionary with values as list to CSV Sritej26 4 3,237 Mar-27-2021, 05:53 PM
Last Post: Sritej26

Forum Jump:

User Panel Messages

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