how to get inputs in string and split using space and break input on occurrance of enter key pressed code example Example: python space separated input l = list(map(int,input().split())