You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
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()
`
The text was updated successfully, but these errors were encountered:
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
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
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()
`
The text was updated successfully, but these errors were encountered: