I have a list of natural numbers and I need to print out every two adjacent integers that have at least one digit in common. So far I've written:
for i in range(len(my_list) - 1):
first, second = my_list[i], my_list[i+1]
if first==second and first>0 and second>0:
print(first, second)
else:
print("nothing")
but, as you can see, it's missing the integer part. I've thought about dividing integers and working with results, but I'm certain that's not going to work.