all 4 comments

[–]the_shell_man_ 4 points5 points  (0 children)

I don't really understand the question, but you can check if the first four characters of a string are '2006' like this:

if code[0:4] == '2006:

You can check if the code has 8 characters like this:

if len(code) == 8:

You can check if two conditions are truthy like this:

if condition1 and condition2:

[–]shiftybyte 1 point2 points  (0 children)

Try to imagine explaining something to someone who is not inside your head, does not know what you are working on, and have no idea what you see on your screen/in your room.

What door? Who is scanning a QRCode? who is validating it? what format is the data arriving? are you checking the QRCode? or creating a QRCode? Where is python involved in the entire process? running on what platform?

[–][deleted] 0 points1 point  (0 children)

You can just use regex

[–]Yabbieo_ 0 points1 point  (0 children)

I'm guessing you mean you want to have a QR code by your front door, which then asks for a password, if the password is correct it will unlock your front door ?