[python] How to display list elements side by side

-Display the elements of the list side by side.

Example 1
L = [1, 2, 3, 4, 5]

print(*L)
1 2 3 4 5

Example 2

L=' '.join(L)
print(L)
1 2 3 4 5 #str

At the time of int

L = map(str, L) #Convert from int to str
L=' '.join(L)
print(L)
1 2 3 4 5

-Display the elements of the list vertically.

[print(i) for i in L]
1
2
3
4
5

(Because it took time when programming for competition.) (If there is an addition, I will add it.)

Recommended Posts

[python] How to display list elements side by side
[Python] Display only the elements of the list side by side [Vertical, horizontal]
How to remove duplicate elements in Python3 list
[Python] How to use list 1
[Python] How to use list 3 Added
[Python] How to make a list of character strings character by character
[Python] How to display random numbers (random module)
[Python] How to convert a 2D list to a 1D list
[Python] Display list elements with variadic arguments
How to display multiplication table in python
How to display python Japanese with lolipop
Summary of how to use Python list
How to display Hello world in python
How to clear tuples in a list (Python)
How to install Python
[Python] How to change the date format (display format)
How to install python
[Algorithm x Python] How to use the list
How to erase the characters output by Python
[Python] How to use list 2 Reference of list value, number of elements, maximum value, minimum value
How to get dictionary type elements of Python 2.7
How to use list []
[Python] How to sort instances by instance variables
How to plot multiple fits images side by side in galactic coordinates using python
[Python] How to remove duplicate values from the list
List of posts related to optimization by Python to docker
How to write a list / dictionary type of Python3
[Python] How to sort dict in list and instance in list
How to list numbers by dividing them into n
How to save a table scraped by python to csv
Group by consecutive elements of a list in Python
[Python] How to output the list values in order
[2020.8 latest] How to install Python
How to install Python [Windows]
python3: How to use bottle (2)
[Python] Convert list to Pandas [Pandas]
How to update Python Tkinter to 8.6
How to use Python argparse
Python: How to use pydub
[Python] How to use checkio
How to run Notepad ++ Python
[Introduction to Python] <list> [edit: 2020/02/22]
How to change Python version
How to develop in Python
[python] How to judge scalar
Getting list elements in Python
[Python] How to use input ()
How to use Python lambda
[Python] How to use virtualenv
python3: How to use bottle (3)
python3: How to use bottle
How to use Python bytes
How to check in Python if one of the elements of a list is in another list
How to switch the configuration file to be read by Python
[Python] How to make an adjacency matrix / adjacency list [Graph theory]
How to swap elements in an array in Python, and how to reverse an array.
[python] Summary of how to retrieve lists and dictionary elements
How to shuffle a part of a Python list (at random.shuffle)
[Ev3dev] How to display bmp image on LCD with python
How to display a list of installable versions with pyenv
How to get the last (last) value in a list in Python