Python Forum
Iteration, selection and adding
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Iteration, selection and adding
#2
You have many questions, i think a start would be to put your deck in a dictionary type object like so:
deck = {'HA':11,'H2':2,'H3':3,'HJ':10}
print(deck['H2'])
I've included a few cards like Hearts/Ace, H 2, H 3, H Jack.... with the values they would have in blackjack.
With the key eg. 'HA', you can find the value and that leads to adding, etc.
Paul
Reply


Messages In This Thread
Iteration, selection and adding - by gandy - May-09-2020, 06:27 AM
RE: Iteration, selection and adding - by DPaul - May-09-2020, 07:55 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Adding markers to Folium map only adding last element. tantony 0 2,171 Oct-16-2019, 03:28 PM
Last Post: tantony

Forum Jump:

User Panel Messages

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