import keyword
keyword_list = keyword.kwlist
string = 'python is True and return as global of all lists'
string_list = string.split()
for word in string_list:
print(word,': ', word in keyword_list )
'''
run:
python : False
is : True
True : True
and : True
return : True
as : True
global : True
of : False
all : False
lists : False
'''