Python Forum
Forum-wide Competition: Rock Paper Scissors [Meta-thread]
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Forum-wide Competition: Rock Paper Scissors [Meta-thread]
#6
This define a set(), right? But you initiate as a dictionary. Or I am wrong?
responses = {}
for me in 'RPS':
   for them in 'RPS':
       responses[me + them] = collections.Counter('RPS')
This is  confusing. If I call the set variable in the interpreter it is surrounded with {} but this defines an empty dict  :dodgy:
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Messages In This Thread
RE: Forum-wide Competition: Rock Paper Scissors [Meta-thread] - by wavic - Oct-08-2016, 10:13 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  system-wide unique incrementing string or number Skaperen 11 4,434 Jul-08-2020, 08:10 PM
Last Post: Yoriz
  re module: want a regexhttps://python-forum.io/Thread-re-module-want-a-regex Skaperen 4 2,682 Sep-19-2019, 10:54 PM
Last Post: Skaperen

Forum Jump:

User Panel Messages

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