Python Forum
Taking brackets out of list in print statement
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Taking brackets out of list in print statement
#1
How do I take brackets out of multiple lists in a print statement. Say I have the following lists of numbers:

j = [2,5]
k = [4,6]
e = [7,8]
r = [9,1]
How would I print "The numbers you have selected are 2,5,4,6,7,8,9,1"? I want to print the numbers from all the lists without the brackets in between.
Reply


Messages In This Thread
Taking brackets out of list in print statement - by pythonprogrammer - Apr-13-2020, 01:25 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to invoke a function with return statement in list comprehension? maiya 4 310 Jul-17-2021, 04:30 PM
Last Post: maiya
  An IF statement with a List variable dedesssse 3 212 Jul-08-2021, 05:58 PM
Last Post: perfringo
  Why doesn't this print statement work? stylingpat 10 1,026 Mar-23-2021, 07:54 PM
Last Post: buran
  Getting a certain value from inside brackets. LeoT 5 611 Mar-01-2021, 03:34 PM
Last Post: buran
  Print max numbers in a list jimmoriarty 1 538 Sep-25-2020, 07:29 AM
Last Post: DPaul
  Print variable values from a list of variables xnightwingx 3 700 Sep-01-2020, 02:56 PM
Last Post: deanhystad
  Runs perfect in Python but fails to print last statement when converted to .exe. Help sunil422 3 732 Aug-13-2020, 01:22 PM
Last Post: deanhystad
  Print the number of items in a list on ubuntu terminal buttercup 2 749 Jul-24-2020, 01:46 PM
Last Post: ndc85430
  Removing internal brackets from a string Astrikor 4 817 Jun-04-2020, 07:54 PM
Last Post: Astrikor
  taking input doesnt print as list bntayfur 2 688 Jun-04-2020, 02:48 AM
Last Post: bntayfur

Forum Jump:

User Panel Messages

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