The True value which only come from the First character of string [Guided Project: Profitable App Profiles for the App Store and Google Play Markets]

Screen Link:

My Code:

def Isitforenglish(string) :
    """ Take a string and return False if all string doesn't belong 
    to the set of common English character """
    for char in string :
        if ord(char) > 127 :
            return False
        return True
print(Isitforenglish('Docs To Go™ Free Office Suite'))
print(Isitforenglish('Instachat 😜'))
print(Isitforenglish('爱奇艺PPS -《欢乐颂2》电视剧热播'))
# Then I tried
print(Isitforenglish('Hello爱奇艺PPS -《欢乐颂2》电视剧热播'))

What I expected to happen:
False (because there are Chinese language inside the application. Therefore it should be False)

What actually happened:


When I check the real data inside the data set. I found some case same as [English + other language] and return True in that case. The example is below
[‘1047808261’, ‘FUNDO[ファンドゥ]- 話題のネタを毎日更新!無料ニュースメディア’, ‘17283072’, ‘USD’, ‘0.0’, ‘0’, ‘0’, ‘0.0’, ‘0.0’, ‘1.0.1’, ‘17+’, ‘Entertainment’, ‘37’, ‘0’, ‘1’, ‘1’]
or in this case we can omit it. can’t we ?

Hi @penkinbjirath,

Welcome to the Community!

The issue with your code is that for now, in the for-loop, you practically check if the first character is English and then quit the loop. To fix it, you should put your return True statement outside the for-loop, i.e. put it on the same indentation level as for.