Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Multiple Passwords
Post: RE: Multiple Passwords

if if password in thisdict.values()shows error
NotPythonQueen Homework 17 6,792 Sep-22-2019, 04:54 AM
    Thread: Multiple Passwords
Post: RE: Multiple Passwords

(Sep-22-2019, 01:57 AM)ichabod801 Wrote: That's because you're missing a colon at the end of line 7. if password in thisdict.values: like this? It works but I also get an error if password in thi...
NotPythonQueen Homework 17 6,792 Sep-22-2019, 03:13 AM
    Thread: Multiple Passwords
Post: RE: Multiple Passwords

(Sep-22-2019, 01:19 AM)ichabod801 Wrote: Because x in thisdict checks against the keys of the dictionary (1, 2, and 3). You would have to check x in thisdict.values(). Note that checking against the...
NotPythonQueen Homework 17 6,792 Sep-22-2019, 01:31 AM
    Thread: Multiple Passwords
Post: RE: Multiple Passwords

Why doesn't it work when I try to use a dictionary instead of list? thisdict = { "1": "sun", "2": "moon", "3": "star" } with the same code?
NotPythonQueen Homework 17 6,792 Sep-22-2019, 12:44 AM
    Thread: Multiple Passwords
Post: RE: Multiple Passwords

Anyway to have it use my list above? That works but also just wondering.
NotPythonQueen Homework 17 6,792 Sep-21-2019, 06:57 PM
    Thread: Multiple Passwords
Post: RE: Multiple Passwords

(Sep-21-2019, 06:41 PM)buran Wrote: (Sep-21-2019, 06:38 PM)NotPythonQueen Wrote: ^^^ This prompts the password, but when I add the moon/star near "if password ==" it does not work.show the exact c...
NotPythonQueen Homework 17 6,792 Sep-21-2019, 06:47 PM
    Thread: Multiple Passwords
Post: Multiple Passwords

I am able to get it to prompt one password, but not all 3. Here is an example of my code: import getpass thislist = ["Sun", "Moon", "Star"] passwds = 'Sun, Moon, Star' password = input("Please ente...
NotPythonQueen Homework 17 6,792 Sep-21-2019, 06:38 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020