Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Function gives ' Object of Type None type has no len()'. #70

Open
Shivam23Thaman opened this issue Mar 9, 2019 · 0 comments
Open

Comments

@Shivam23Thaman
Copy link

Shivam23Thaman commented Mar 9, 2019

I am trying to use functions to solve this but I am getting the above stated error, Please help. Here's my code :
`android_final = []
ios_final = []
def free_apps(dataset , index):
for app in dataset:
price = app[index]
if (price == 0) and (dataset == English_only_apps_android):
return android_final.append(app)
elif (price == 0) and (dataset == English_only_apps_ios):
return ios_final.append(app)

android_useful = free_apps(English_only_apps_android,7)
ios_useful = free_apps(English_only_apps_ios,4)

def datasize():
length_useful_android = len(android_useful)
length_useful_ios = len(ios_useful)
print("Length of Useful Data from the Android Dataset : ", length_useful_android)
print("\nLength of Useful Data from the IOS Dataset : ", length_useful_ios)

datasize()
`

@Shivam23Thaman Shivam23Thaman changed the title Using Function gives 'None type is not subscriptable' error. Using Function gives ' Object of Type None type has no len(). Mar 11, 2019
@Shivam23Thaman Shivam23Thaman changed the title Using Function gives ' Object of Type None type has no len(). Using Function gives ' Object of Type None type has no len()'. Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant