python学习0day

一开始学习python没有什么感觉,也没怎么用到,时间间隔大概有一年了开始重新拾起python,话说滋味不太好受,推荐大家学到就常常的练习,不要和小白一样,难受。。。。

推荐一个网站:

菜鸟教程 - 学的不仅是技术,更是梦想!
https://www.runoob.com/

第一天从基础开始吧

# !/usr/bin/env python
#  -* - coding :utf-8 -*-
'''s = "username\tcmail\tpassword\nlaiying\[email protected]\t123\n"
v = s.expandtabs(20)#给输入的字符分段,规格是6,使得上下都对齐
print(v, len(v))
 test = "as4df"
c = test.isalpha()
print(c)#判断是否是纯字母'''
'''test = "123"
v1 = test.isdecimal()
v2 = test.isdigit()
print(v1, v2)#print可以多次输出'''

'''test = "asfhgsfdksfgdkcbvmhgs"
v = test.replace("hgs", 'bbb',1)#把hgs全部都换成bbb
print(v)'''

test = input(">>>")
print(test)
o = len(test)
print(o)
r = range(0, o)
for item in r:
    print(item, test[item])

暴露了我的歌曲嘻嘻嘻。。。。。

猜你喜欢

转载自www.cnblogs.com/chuxinbubian/p/10680481.html