Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dictionnary brackets issue
#2
You can't. That's the return value. The return value is a list of dictionaries. That's what a list of dictionaries looks like. If you want to print that return value in a way that does not have those brackets, you can do that. But you would need to to loop through the values in that list, constructing a string representation of the list that did not have those brackets. Something like print(', '.join(str(data)[1:-1] for data in return_value)) would do that.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
Dictionnary brackets issue - by Reldaing - Nov-10-2019, 10:38 PM
RE: Dictionnary brackets issue - by ichabod801 - Nov-10-2019, 11:54 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [SOLVED] [BeautifulSoup] Why does it turn inserted string's brackets into </>? Winfried 0 1,561 Sep-03-2022, 11:21 PM
Last Post: Winfried
  Reading list items without brackets and quotes jesse68 6 4,702 Jan-14-2022, 07:07 PM
Last Post: jesse68
  Data pulled from SQL comes in brackets nickzsche 3 2,722 Jan-04-2022, 03:39 PM
Last Post: ibreeden
  For Loop and Use of Brackets to Modify Dictionary in Tic-Tac-Toe Game new_coder_231013 7 2,336 Dec-28-2021, 11:32 AM
Last Post: new_coder_231013
  Dictionnary indexing error Ander 6 1,935 Sep-10-2021, 12:22 PM
Last Post: Ander
  Getting a certain value from inside brackets. LeoT 5 3,074 Mar-01-2021, 03:34 PM
Last Post: buran
  Removing internal brackets from a string Astrikor 4 2,725 Jun-04-2020, 07:54 PM
Last Post: Astrikor
  Taking brackets out of list in print statement pythonprogrammer 3 2,433 Apr-13-2020, 12:25 PM
Last Post: perfringo
  printing a list contents without brackets in a print statement paracelx 1 2,160 Feb-15-2020, 02:15 AM
Last Post: Larz60+
  python dictionnary Omar_Yatim 3 2,872 Dec-08-2019, 05:12 AM
Last Post: scidam

Forum Jump:

User Panel Messages

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