Jul-11-2019, 09:42 AM
To make it work,also for now remove stuff that don't make sense.
To check a condition in function then something like this:
import json def ussubem(): sub_e = input('Please enter your subscription email: \n ') return f'Thank you, will now receive regular emails about The Urban Macchiato to {sub_e}' email = ussubem() with open('usersub.json', 'w') as json_file: json.dump(email, json_file)When you do
userfav = True
it's overwrite function userfav()
then all code is gone and it's only True.To check a condition in function then something like this:
if 'email stuff' in userfav(): # Write json else: # Not okay,try again