美文网首页Python四期爬虫作业
【Python爬虫】8.12作业

【Python爬虫】8.12作业

作者: zhangf | 来源:发表于2017-08-13 09:52 被阅读0次

a ='i'

b ='like'

c ='python'

print(a+'\t'+b+'\t'+c)

s =' sdghHhf '

s1 = s.strip()

print(s1)

s2 = s1.upper()

print(s2)

s3 = s1.lower()

print(s3)

s4 = s1.find('h')

print(s4)

x ='I {} python'

x1 = x.replace('{}','like')

print(x1)

x2 = x.format('like')

print(x2)

capital='人民币100万元'

print(len(capital))

ifcapital.isdigit():

print('it is digit')

else:

print('it is not digit')

相关文章

网友评论

    本文标题:【Python爬虫】8.12作业

    本文链接:https://www.haomeiwen.com/subject/vovsrxtx.html