5 Mart 2016 Cumartesi 23:52:58 UTC+2 tarihinde Ömer sarı yazdı: > hi , all , l m fresh user and l m trying to learn python by doing practice > but l got stuck in that , l need help , l m a beginner and l learn some > basic things so far so, plz take in consideration that before command . > > here is my code trial: > #login by using username and password > > loop=1 > > paword=['1234','5678'] > pawordch=["1","2","3","4","5","6","7","8","9","0","/","(",")","*","%","&","!","a","b","c","d","e","f","g","h","k","l","m","n","o","p","r","s","t","y","v","y","z","x"] > name=['murat','can','omer','owrasa'] > > while loop==1 : > print "welcome my website,plz if you have an account , just login , > otherwise , register plz" > username=raw_input("username:") > password=raw_input("password:") > if username in name and password in paword: > print "login is successful, and continue page 2" > else : > print" please register" > login_username=raw_input ("username:") > login_password=raw_input("password:") > for login_password in pawordch: > if login_password in pawordch : > name.append(login_username) > paword.append(login_password) > print "relogin ,plz" > print name ,"",paword > login_username=raw_input ("username:") > login_password=raw_input("password:") > if login_username in name and login_password in paword: > print "login successful , proceed to page 2" > break > > else: > print "login is unseccesful and please make sure your > username and password is correct" > > > .l would like to do samething when we login a website. l want program if > username is not registered , register first , then store it , and l want > program ask for some specific characters , like 1,2,3../,%. > > thanks for any clearification in advance
for example : some websites ask for a password including some specific characters , like one letter, one ( /,%,*,),(,...) so my purpose is to create a program .first ask for username , then password , then check them , if they don't match with stored (username and password ) , make them register and during that , store "username " and "password" but "password must be including 1 letter , 1 sign , and less than 10 length , more than 4 . l don't know how to do it.as l tried many things but l got error . l hope it would be more explaintory as my English is not good enough.thanks for any advice in advance best regards. -- https://mail.python.org/mailman/listinfo/python-list