I want to check if my list's first four elements are digits. what i did is as follows:
myList = ['0', '3', '2', '7', 'O', 'K', 'P']
if myList[0:4] in string.digits:
print('okay')
else:
print('wrng')
But this gives the following error.
TypeError: 'in <string>' requires string as left operand, not list
How can I achieve this?