Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

print nested list in new lines

A = [[1, 2, 3], [2, 3, 4], [4, 5, 6]]
print("OUTPUT1: ")
[print(a) for a in A];
'''
OUTPUT1:
[1, 2, 3]
[2, 3, 4]
[4, 5, 6]
'''
# --------------------------------------------------------------
# if you don't want to see [] in the printout, then do
# [print(*a) for a in A];
A = [[1, 2, 3], [2, 3, 4], [4, 5, 6]]
print("
OUTPUT2: ")
[print(*a) for a in A];
'''
OUTPUT2:
1 2 3
2 3 4
4 5 6
'''
Comment

PREVIOUS NEXT
Code Example
Python :: how to add card using py-trello API 
Python :: python program to find fibonacci series using function recursion loop 
Python :: position in list python 
Python :: python date from yy/mm/dd to yy-mm-dd 
Python :: how to open a website with selenium python 
Python :: extract image from pdf python 
Python :: write specific columns to csv pandas 
Python :: pip proxy settings 
Python :: loading text file delimited by tab into pandas 
Python :: python write list to text file 
Python :: python text underline 
Python :: drawkeypoints cv2 
Python :: python list inversion 
Python :: python live server 
Python :: discord.py get a bot online 
Python :: Remove the First Character From the String in Python Using the Slicing 
Python :: how to save a dictionary as a file in python 
Python :: install log21 python 
Python :: discord.py commands.group 
Python :: convert bytes to numpy array python 
Python :: python discord how to get user variables 
Python :: How to convert text into audio file in python? 
Python :: python print without space 
Python :: ball bounce in pygame 
Python :: is there a python command that clears the output 
Python :: python wsgi server 
Python :: make column nullable django 
Python :: pyqt tex 
Python :: drop multiple columns in python 
Python :: remove turtle 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =