[Python] How to put any number of standard inputs in a list

Note that there was a problem that atcoder had to receive the following input

3              //Number of inputs N
2 4 6      //A1 ・ ・ ・ AN

When there is an input, I will post how to store these N and A1 to AN in the list.

N=int(input())
array = list(map(int,input().strip().split()))

Easy! The question of whether it was necessary to write an article ...

Recommended Posts

[Python] How to put any number of standard inputs in a list
How to get a list of built-in exceptions in python
How to identify the element with the smallest number of characters in a Python list?
How to clear tuples in a list (Python)
How to format a list of dictionaries (or instances) well in Python
How to get the number of digits in Python
How to write a list / dictionary type of Python3
How to pass the execution result of a shell command in a list in Python
How to get a list of files in the same directory with python
[Python] How to make a list of character strings character by character
How to shuffle a part of a Python list (at random.shuffle)
Get the number of specific elements in a python list
How to develop in a virtual environment of Python [Memo]
How to get the last (last) value in a list in Python
How to check in Python if one of the elements of a list is in another list
How to count the number of occurrences of each element in the list in Python with weight
[Python] How to convert a 2D list to a 1D list
Display a list of alphabets in Python 3
[Itertools.permutations] How to put permutations in Python
How to get a stacktrace in python
Summary of how to use Python list
Try to get a list of breaking news threads in Python.
How to check the memory size of a variable in Python
How to check the memory size of a dictionary in Python
How to delete multiple specified positions (indexes) in a Python list
[Python] How to delete rows and columns in a table (list of drop method options)
How to pass the execution result of a shell command in a list in Python (non-blocking version)
How to embed a variable in a python string
Summary of how to import files in Python 3
How to send a visualization image of data created in Python to Typetalk
How to create a JSON file in Python
Make a copy of the list in Python
[Introduction to Python] How to sort the contents of a list efficiently with list sort
Summary of how to use MNIST in Python
How to put a line number at the beginning of a CSV file
How to put a half-width space before letters and numbers in Python.
To add a module to python put in Julialang
[Python] How to use list 2 Reference of list value, number of elements, maximum value, minimum value
How to notify a Discord channel in Python
[Python] How to draw a histogram in Matplotlib
How to output "Ketsumaimo" as standard output in Python
How to remove duplicate elements in Python3 list
How to write when you want to put a number after the group number to be replaced with a regular expression in re.sub of Python
How to achieve something like a list of void * (or variant) in Go?
How to convert / restore a string with [] in python
[Python] How to expand variables in a character string
Things to note when initializing a list in Python
[Python] How to sort dict in list and instance in list
Group by consecutive elements of a list in Python
How to execute a command using subprocess in Python
[Python] How to output the list values in order
[Linux] How to put your IP in a variable
[Python] How to use list 1
How to develop in Python
How to find the first element that matches your criteria in a Python list
How to find the optimal number of clusters in k-means
How to slice a block multiple array from a multiple array in Python
How to debug the Python standard library in Visual Studio
How to extract any appointment in Google Calendar with Python
A story about how to specify a relative path in python.
How to use the __call__ method in a Python class