Tour of doraemon of python int, boolean and string 1

Supplementary operation

1.in and not in # judge whether something in there

content = input "Please enter the text:"

if "sex" in content:

  print ( "contains sensitive character")

while True:

  content = input "Please enter the text:"

  if "sex" in content:

    print ( "contains sensitive character")

  else:

  print(content)

  break

2. Priority

not 2>1

Interpretation: not 2> 1 # error

      not 2> 1 # is correct not and or symbols of all operations in the minimum level of

Guess you like

Origin www.cnblogs.com/doraemon548542/p/11067145.html