This is my program:
def main(): print('This is a program to calculate the setprod') print() userinput = input('Enter two sets separated by a comma: ') value1, value2 = userinput.split(',') mylist1 = eval(value1.strip()) mylist2 = eval(value2.strip()) print(mylist1 + mylist2) main()
If I enter following:
>>> This is a program to calculate the setprod Enter two sets separated by a comma: set(), set()
I get this error:
print(mylist1 + mylist2)
TypeError: unsupported operand type(s) for +: 'set' and 'set'
How do I fix this problem?