I want to find if a word contains digit and characters and if so separate the digit part and the character part. I want to check for tamil words, ex: ரூ.100
or ரூ100
. I want to seperate the ரூ.
and 100
, and ரூ
and 100
. How do i do it in python. I tried like this:
for word in f.read().strip().split():
for word1, word2, word3 in zip(word,word[1:],word[2:]):
if word1 == "ர" and word2 == "ூ " and word3.isdigit():
print word1
print word2
if word1.decode('utf-8') == unichr(0xbb0) and word2.decode('utf-8') == unichr(0xbc2):
print word1 print word2