Python Forum
curious syntax with dictionary item
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
curious syntax with dictionary item
#4
(Mar-09-2019, 04:16 PM)inselbuch Wrote: So the dictionary contains a tuple... where one part of the tuple is None?

Yes... no. The dictionary contains a tuple. The tuple contains one thing, which is tuple[0], which is 'hello'. The comma is not in the output to show that there is a second None item, it is there to show that it is a tuple and not just a set of parentheses.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
curious syntax with dictionary item - by inselbuch - Mar-09-2019, 03:57 PM
RE: curious syntax with dictionary item - by ichabod801 - Mar-09-2019, 04:21 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Curious about decorator syntax rjdegraff42 14 2,234 May-03-2023, 01:21 PM
Last Post: rjdegraff42
  python dictionary syntax nafshar 2 908 Apr-24-2023, 07:26 PM
Last Post: snippsat
  Remove an item from a list contained in another item in python CompleteNewb 19 5,911 Nov-11-2021, 06:43 AM
Last Post: Gribouillis
  How to modify item in dictionary? Winfried 7 3,513 Nov-21-2020, 07:12 PM
Last Post: bowlofred
  Lists first item is a number however i cant compare it with an int getting syntax err Sutsro 4 2,461 Apr-22-2020, 10:22 AM
Last Post: Sutsro
  A Dictionary in a Dictionary Syntax PythonGainz 3 2,184 Apr-16-2020, 07:16 AM
Last Post: TomToad
  looking fo an expression that yields a dictionary without an item Skaperen 5 2,992 Apr-09-2019, 02:05 AM
Last Post: Skaperen
  deleting item from dictionary Skaperen 6 3,127 Feb-20-2019, 01:18 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

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