how to take n inputs in python