day3_python_learn for mofan

你。 提交于 2020-03-01 01:44:00

Today I have practiced my oral english.
so so
I may need to use it mpre frequently
Seek joy amidst sorrow

set

char_list=['a','b','v','v','v','e','r','f']
##sentence='Welcome to our home'
##print(type(set(char_list)))
###type is class set
##print(set(char_list))
###capital letters or lowercase letters are different
##unique_char=set(char_list)
##unique_char.add('a')
##print(unique_char)
##unique_char.clear()
#delate all
##print(unique_char.remove('a'))
##print(unique_char.discard('y'))
#error  return something but not the list
set1=char_list
set2={'a','c','s','w','c','s','d','f'}
c1=set1.difference(set2)
print(c1)
d1=set1.intersection(set2)
print(d1)

#check the set if you want to use it
#only know that set can find the differences and intesection of two list or sentenses.

RegEx

正则表达式

#RegEx
#正则表达式
import re
#爬虫工具,了解即可

莫凡python 官网关于正则表达式的说明
Done!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!