How do i fix my Sign up | SoloLearn: Learn to code for FREE!

0

How do i fix my Sign up

I can't fix my problem that i can't seperate when it is False example if pasword is in use in the list it just says choose diferent pasword but if user name then it says choose diferent user name , or both if both false. https://code.sololearn.com/c0Y1VtqtWRvn/?ref=app

3/4/2020 9:03:37 PM

Māris Heinols

1 Answer

New Answer

+6

I would use a dictionary and handle KeyError using .get () If exists, return value, else return None unames = {'jackson':True, 'Marla':True} in = input() in_name = unames.get(in) if in_name: // choose other username else: // do your stuff