原创 Python隨機生成密碼

廢話不說,直貼代碼 # coding:utf-8 """ Author : han Email : [email protected] Time : 2019-07-27 17:1

原创 Python——中綴到後綴的轉換(Stack)

先貼代碼,剩下的結合Pycharm的Debug貼圖一一說明#coding:utf-8 from pythonds.basic.stack import Stack from string import * def infixToPos

原创 range()——python2與python3不同之處

當你在不同python版本下使用 range() 時, 需要注意了我們先在原始IDE下分別碼出來:python 2.>>> range(2, 19) [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 

原创 Python——此代碼,待我揣摩揣摩

1、關於可視化遞歸問題import turtle def tree(branchLen, t):     if branchLen > 5:         t.forward(branchLen)         t.right(20

原创 Python——簡單實現十進制對十六、八、二進制的轉換

#coding:utf-8 '''     最近在看數據結構————Stack     這也是來自國外大神寫的一個" 教學 "     十進制數字轉換成————十六、八、二進制 ''' # 通過面向對象class了一個Stack c

原创 Python入門——簡單明瞭的實現:用戶註冊及登錄

#coding:utf-8 ''' 這個程序管理用於登錄系統的用戶信息:登錄名字和密碼。登錄用戶帳號建立後,已存在用戶 可以用登錄名字和密碼重返系統。新用戶不能用別人的登錄名建立用戶帳號。 ''' db = {} def