Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. password = '123'
  2. user_input = ''
  3.  
  4. if user_input:
  5. if password == user_input and 2 * 2 == 4:
  6. print('Correct')
  7. else:
  8. print('Pls input smth')
  9.  
  10. # *************************************************************************************
  11.  
  12. # <
  13. # >
  14. # <=
  15. # >=
  16. # !=
  17. # or
  18. # and
  19. # not
  20.  
  21. # *************************************************************************************
  22.  
  23. # s = '12324'
  24. # if len(s)==4:
  25. # print('ok')
  26. # elif len(s)==3:
  27. # print('not ok')
  28. # else:
  29. # print('Chto')
  30.  
  31. # *************************************************************************************
  32.  
  33. # // Тернарный оператор - мало где используется, только если в очень простых ситуациях
  34. # print('Welcome') if user_input else print ('Wrong password')
  35.  
  36. # *************************************************************************************
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement