6-1

 1 #6-1
 2 
 3 #help(string)
 4 import string
 5 
 6 str = "helloworld"
 7 substr = "h1e"
 8 
 9 if string.find(str, substr) != -1:
10   print"substr=%s is part of %s" % (substr, str)
11 else:
12   print"not substring" 
View Code

相关文章:

  • 2021-10-09
  • 2022-12-23
  • 2022-12-23
  • 2021-12-08
  • 2021-12-06
  • 2021-07-29
  • 2021-09-29
猜你喜欢
  • 2022-02-25
  • 2021-07-07
  • 2021-09-16
  • 2021-09-08
  • 2021-12-14
  • 2022-12-23
  • 2022-01-12
相关资源
相似解决方案