Python Forum
[Help] List of Lists not printing both Cmder/Anaconda?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Help] List of Lists not printing both Cmder/Anaconda?
#4
You can use pprint.
from pprint import pprint

pprint(gen_maze())
E:\div_code
λ python ma.py
[['M', 'o', 'o', 'M', 'o', 'o', 'o', 'M', 'o', 'o', 'o'],
 ['o', 'M', 'M', 'o', 'o', 'M', 'o', 'M', 'o', 'o', 'M'],
 ['o', 'M', 'o', 'o', 'o', 'M', 'o', 'o', 'M', 'o', 'M'],
 ['o', 'o', 'o', 'o', 'M', 'M', 'o', 'o', 'o', 'M', 'M'],
 ['o', 'M', 'o', 'M', 'o', 'o', 'M', 'M', 'M', 'M', 'M'],
 ['o', 'o', 'M', 'M', 'M', 'M', 'o', 'M', 'M', 'M', 'M'],
 ['o', 'o', 'o', 'M', 'M', 'M', 'o', 'o', 'o', 'o', 'M'],
 ['M', 'o', 'o', 'M', 'M', 'M', 'M', 'M', 'o', 'M', 'o'],
 ['M', 'o', 'o', 'M', 'o', 'o', 'o', 'o', 'o', 'M', 'M'],
 ['o', 'M', 'o', 'M', 'M', 'o', 'M', 'M', 'o', 'M', 'M'],
 ['M', 'o', 'o', 'o', 'o', 'o', 'o', 'M', 'M', 'M', 'M']]
Reply


Messages In This Thread
RE: [Help] List of Lists not printing both Cmder/Anaconda? - by snippsat - Aug-15-2018, 02:45 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  List all possibilities of a nested-list by flattened lists sparkt 1 954 Feb-23-2023, 02:21 PM
Last Post: sparkt
  user input values into list of lists tauros73 3 1,106 Dec-29-2022, 05:54 PM
Last Post: deanhystad
  returning a List of Lists nafshar 3 1,130 Oct-28-2022, 06:28 PM
Last Post: deanhystad
  Creating list of lists, with objects from lists sgrinderud 7 1,727 Oct-01-2022, 07:15 PM
Last Post: Skaperen
Question Printing through list.. again jesse68 2 1,174 Apr-16-2022, 03:24 PM
Last Post: jesse68
  How to efficiently average same entries of lists in a list xquad 5 2,188 Dec-17-2021, 04:44 PM
Last Post: xquad
  sorting a list of lists by an element leapcfm 3 1,926 Sep-10-2021, 03:33 PM
Last Post: leapcfm
  behavior list of lists roym 5 2,160 Jul-04-2021, 04:43 PM
Last Post: roym
  List of lists - merge sublists with common elements medatib531 1 3,433 May-09-2021, 07:49 AM
Last Post: Gribouillis
  help for list printing jip31 8 3,712 May-01-2021, 03:52 AM
Last Post: Pedroski55

Forum Jump:

User Panel Messages

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