I have a string "Halo Device ANumber : 6232123123 Customer ID : 16926"
I want to search with this keyword : "62"
Then if there any, I want to show it's whole substring "6232123123"
string = str('Halo Device ANumber : 6232123123 Customer ID : 16926')
ind = string.find('62')
word = string.split()[ind]
print('62 found in index: ', ind)
print('substring : ', word)
output :
62 found in index: 22
substring : Device