Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

get input on same line python

n = 2  # how many numbers to accept
numbers = [int(num) for num in input().split(" ", n-1)]

print(numbers)
Comment

PREVIOUS NEXT
Code Example
Python :: check number of elements in list python 
Python :: sort and remove duplicates list python 
Python :: python get env 
Python :: file uploads django 
Python :: adding one element in dictionary python 
Python :: logical operators pandas 
Python :: django queryset limit 
Python :: encrypt password with sha512 + python 
Python :: check palindrome in python 
Python :: knn with sklearn 
Python :: convert a text file data to dataframe in python without pandas 
Python :: get source code selenium python 
Python :: pandas read excel certain columns 
Python :: break in python 
Python :: get UTC time for IST time python 
Python :: create a django project 
Python :: django convert object to dict 
Python :: BURGERS2 solution 
Python :: activate venv 
Python :: how to open folder in python 
Python :: Python Date object to represent a date 
Python :: pandas apply check for string length in column 
Python :: read parquet from s3 and convert to dataframe 
Python :: python community 
Python :: selenium get h1 text python 
Python :: python check if array 
Python :: python how to get last element in a list 
Python :: input function in python 
Python :: flask docs 
Python :: reorder list python 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =