Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Working with Lists
#1
Hello -

New to Python and have a question about formatting a list of numbers.

My output is coming out like this:
[(20, 40), (20, 41), (20, 42), (20, 43), (20, 44), (21, 40), (21, 41), (21, 42), (21, 43), (21, 44), (22, 40), (22, 41), (22, 42), (22, 43), (22, 44), (23, 40), (23, 41), (23, 42), (23, 43), (23, 44), (24, 40), (24, 41), (24, 42), (24, 43), (24, 44)]

You'll note the space after each comma. My question is, how do I format the list to remove the spaces? I want the output to look like this: [(20,40),(20,41),(20,42) ..so on and so forth.

Appreciate the help!
Reply


Messages In This Thread
Working with Lists - by TheJax - Jan-23-2020, 01:17 AM
RE: Working with Lists - by michael1789 - Jan-23-2020, 03:03 AM
RE: Working with Lists - by DeaD_EyE - Jan-23-2020, 09:11 AM
RE: Working with Lists - by TheJax - Jan-23-2020, 02:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Split dict of lists into smaller dicts of lists. pcs3rd 3 2,423 Sep-19-2020, 09:12 AM
Last Post: ibreeden
  sort lists of lists with multiple criteria: similar values need to be treated equal stillsen 2 3,314 Mar-20-2019, 08:01 PM
Last Post: stillsen

Forum Jump:

User Panel Messages

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