Python: count word lenth in site name -
got stuck part of python script. example got 2 domain names like:
- domain.com
- new.domain1.us
is possible count word lenght of every word, splited dot , put lenght in brackets before every word like:
- (6)domain(3)com
- (3)new(7)domain1(2)us
string = 'domain.com' answer = '' x in string.split('.'): answer += '(' + str(len(x)) + ')' + x print(answer)
Comments
Post a Comment