Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how take in put as list in integer value

# creating an empty list
lst = []
  
# number of elements as input
n = int(input("Enter number of elements : "))
  
# iterating till the range
for i in range(0, n):
    ele = int(input())
  
    lst.append(ele) # adding the element
      
print(lst)
Comment

PREVIOUS NEXT
Code Example
Python :: DJANGO rest framework GET POST 
Python :: python round without math 
Python :: print example 
Python :: create virtualenv python3 
Python :: count non nan values in column 
Python :: python check if file is writable 
Python :: raw input py 
Python :: smallest number of 3 python 
Python :: pycharm update python version 
Python :: python map() 
Python :: get all keys and values from dictionary python 
Python :: python override string class 
Python :: add values to tuple python 
Python :: python code to demonstrate inheritance 
Python :: length of a string python 
Python :: how to create pyw file 
Python :: type checking python 
Python :: character to ascii python 
Python :: jupyterlab interactive plot 
Python :: python sqrt function 
Python :: delete last few items from a list python 
Python :: python do while loop 
Python :: django signals 
Python :: python get name of vlue 
Python :: how ro have a incresing variable in python 
Python :: get mean using python 
Python :: change python version in colab 
Python :: Add label to histogram 
Python :: data must be 1-dimensional pd.dataframe 
Python :: cannot reshape array of size 2137674 into shape (1024,512,3,3) 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =