I made some code in python to read stdin. When I execute it and input all the data I want I press Ctrl-D, which should send EOF macro but in reality nothing happens. Im on arch-linux using alacritty terminal and zsh shell if thats relevant.
from sys import stdin, stdout
bl = False
res = ""
for line in stdin:
while line:
if bl:
bl = False
arr = list(map(int, line.strip().split(" ")))
dicc = {arr.index(x) : x for x in arr}
for key, value in dicc.items():
res += "{}:{} ".format(key, value)
else:
bl = True
stdout.write(res)