Q: I try to check the sum of numbers in two lists, but I have an error "TypeError: unsupported operand type(s) for +: 'int' and 'str'" nums = (input('Enter any even number amount: '))
if nums.isdigit():
    print('OK')
else:
    print('Error')
nums_list = list(nums)
length = len(nums_list)

middle_index = length // 2
first_half = nums_list[:middle_index]
print(first_half)

second_half = nums_list[middle_index:]
print(second_half)

if sum(first_half) == sum(second_half):  #Check the sum of numbers in the first and second lists equals to sum of the numbers in the second one, print 'You're the lucky one'. If not - print 'not today'.
    print("You're the lucky one!")
else:
    print("Not today")


A: Currently, the list nums_list has all values in string format. You need to convert you list elements to int, you can do that using the map function. You can do that with the following line and it will fix the error
nums_list = list(nums)
nums_list = list(map(int, nums_list))

or
nums_list = list(map(int, list(nums))


A: This is because nums is taking in a string as input. isdigit() method returns True if all the characters are digits, otherwise False. It will return True even if the the object provided to it is a string. It will just check whether the characters are numbers or not, like so:
>>> a = "5"
>>> print(a.isdigit())
True

What you want to do is specify that you want an integer input from the user:
nums = int(input('Enter any even number amount: '))

Even now your code won't work because you cannot just turn an integer into a list as 'int' object is not iterable.
So, what you want to do is create a loop to append values to your list:
choice = int(input("How many nos. do you want to enter:"))
nums_list = []
for i in range(choice):
    nums = int(input('Enter any number amount: ')) # Doesn't have to be even as you are using integer division (//)
    nums_list.append(nums)

length = len(nums_list) 
middle_index = length // 2
first_half = nums_list[:middle_index]
print(first_half)
second_half = nums_list[middle_index:]
print(second_half)
if sum(first_half) == sum(second_half):
    print("equal")
else:
    print("not equal")

This code asks the user to input the number of integers they want to enter, then, runs a for loop to take these as inputs and appends them to an empty list, now, it divides the list into two lists and checks for equality against the sum of their elements.
An example of it running:
How many nos. do you want to enter:4
Enter any even number amount: 1  # Loop runs 4 times
Enter any even number amount: 1
Enter any even number amount: 1
Enter any even number amount: 1
[1, 1]
[1, 1]
equal

And if the lists aren't equal:
How many nos. do you want to enter:5
Enter any even number amount: 1
Enter any even number amount: 1
Enter any even number amount: 1
Enter any even number amount: 1
Enter any even number amount: 1
[1, 1]
[1, 1, 1]
Not equal


A: Since you are trying to sum an empty array you got this error, but you can solve it using the follwoing code:
nums = (input('Enter any even number amount: '))
if nums.isdigit():
    print('OK')
else:
    print('Error')
nums_list = list(nums)
length = len(nums_list)
middle_index = length // 2
first_half = list(map(int, nums_list[:middle_index]))
second_half = list(map(int, nums_list[middle_index:]))
print("first_half", sum(first_half))
print( "second_half",sum(second_half))
if sum(first_half) == sum(second_half):  
    print("You're the lucky one!")
else:
    print("Not today")

You just need to replace your array assignment to list(map(int, array))
