Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Print a nested list line by line in python

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 :: py-trello add card 
Python :: how do you create a countdown using turtle python 
Python :: exact distance 
Python :: python code to wait 
Python :: phi 
Python :: send email with python 
Python :: django user group check 
Python :: install python 3 on mac 
Python :: select a value randomly in a set python 
Python :: latest django version 
Python :: hide particular attribute in django admin 
Python :: Codeforce 4C solution in python 
Python :: how to map array of string to int in python 
Python :: positive lookahead regex python 
Python :: train test validation sklearn 
Python :: python boxplot legend 
Python :: remove duplicates without changing order python 
Python :: how to add and subtract days datetime python 
Python :: get every nth element in list python 
Python :: python get time difference in milliseconds 
Python :: python print object 
Python :: greeper 
Python :: add numpy array to pandas dataframe 
Python :: discord embed add image 
Python :: python poner en mayusculas 
Python :: python for loop backwards 
Python :: spacy matcher syntax 
Python :: pyqt display math 
Python :: capitalize first letter in python 
Python :: kill turtle 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =