code to saperate input based on comma code example
Example 1: python input comma separated values
lst = input().split(',')
Example 2: how to input comma separated int values in python
lst = list(map(int, input("Enter comma separated values: ").split(",")))