鱼C论坛

 找回密码
 立即注册
分享 【Python学习笔记】设计登陆功能
2016-12-24 13:02
def NewUser(infoList): userAcnt = raw_input('Please create your account:') while userAcnt in infoList.keys(): print 'The name have been used!\n' #NewUser(infoList) userAcnt = r ...
411 次阅读|0 个评论
分享 【Python学习笔记】建立通讯录
2016-12-23 22:42
def initInfo(): info = {'Cao':'021-43333333',\ 'Kobe':'021-98888888',\ 'Harry':'021-3467890'} return info def searchInfo(InfoList): Name = raw_input('Please search ...
388 次阅读|0 个评论
分享 【Python学习笔记】提取密码,单个字符仅前三和后三个为大写,密码字符为小写
2016-12-21 20:02
自编代码:ASCII码实现 def find_passwd(): message = str();passwd = str();messlist = list();flag = list() data1 = open(r'D:\fishc\string2.txt') for each in data1.readlines(): message += each for each in messa ...
414 次阅读|0 个评论
分享 【Python学习笔记】统计字符找出关键信息
2016-12-21 16:38
def count_list(): num = 0; alph = 0; space = 0; other = 0 message = str() data1 = open(r'D:\fishc\string1.txt').readlines() lenth1 = len(data1) for i in range(lenth1): for j in data1 : &n ...
387 次阅读|0 个评论
分享 【Python学习笔记】统计字母数字空格等个数
2016-12-21 15:06
自编代码: def count_para(*param): coun = 0 for i in param: coun += 1 num = 0; alph = 0; space = 0; other = 0 for j in list(i): asc = ...
393 次阅读|0 个评论
分享 【Python学习笔记】回文联判断
2016-12-21 15:04
自编代码: def palin(var): var2 = var if var2 == var: print var,'is palindrome' else: print var,'is not palindrome' 甲鱼参考代码: def palindrome(string): list1 = list(strin ...
499 次阅读|0 个评论
分享 【Python学习笔记】密码等级评级
2016-12-20 19:47
自编代码: print 'Please set your passwords:', passwd = raw_input() passlen = len(passwd) str1 = list(r'''`!@#$%^*()_+-=/*{} str3 = + #contain speacial special charater spech = False for each in str1: if each in passwd: spech = True &nb ...
226 次阅读|0 个评论
分享 【Python学习笔记】文字游戏
2016-12-20 19:40
自编代码: import random print('-----------Number Guess-----------') answer = random.randint(0,10) print "Guess the number:", for i in range(4): temp = raw_input() while not temp.isdigit(): print "Type is wrong,", ...
400 次阅读|0 个评论

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-3-29 16:02

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

返回顶部