python And operator:

  • The python And operator is one of the logical operators.
  • In And operator, if both the operands are true then it returns true, otherwise false.
  • And operator is applicable for boolean type and non-boolean type.
  • For example: 1 And  " a"  then the result is "a".  
  •  It is represented by the  "&" symbol.
  •  It is written as  x &y
syntax:(a&b).

# write a python program using And operator.

  1. x=23
  2. y=44
  3. print(x>10 and y>10)
  4. print(x<40 and y<40)
  5. print(x&y)
  output:   true
                false
                 4

Instance Of Java

We will help you in learning.Please leave your comments and suggestions in comment section. if you any doubts please use search box provided right side. Search there for answers thank you.
«
Next
Newer Post
»
Previous
Older Post

No comments

Leave a Reply

Select Menu