i'm trying to convert string to integer, but it's not that so easier than i'm thinking.
content = '''
<entry colname="1" morerows="1" morerowname="2"><p>111</p></entry>
<entry colname="2" rowname="2"><p></p></entry>'''
morerows = ''.join(re.findall('morerows="\d"', content))
morerows_n = int(''.join(re.findall('\d', morerows)))
print(morerows_n)
this results error as follow :
morerows_n = int(''.join(re.findall('\d', morerows)))
ValueError: invalid literal for int() with base 10: ''
where is wrong with that code? i've tried int() function but doesn't work and it's not float also.
any help?
1for me