A
A
Artyom Innokentiev2016-03-25 18:18:52
Python
Artyom Innokentiev, 2016-03-25 18:18:52

Why isn't isalpha working?

I am reading data from an excel file through openpyxl , in cell E18 the line "transition" is written:

from openpyxl import load_workbook

wb = load_workbook(filename='data.xlsx', read_only=True)
ws = wb.active
data = ws['E18'].value
print(data.isalpha())

Prints False - why?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
abcd0x00, 2016-03-26
@abcd0x00

>>> 'переход'.isalpha()
False
>>> u'переход'.isalpha()
True
>>> unicode('переход', 'utf-8').isalpha()
True
>>>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question