2017年11月24日

Python 递归 Resursion()

摘要: 条件: ①递归有最小值或有确定值 ②fun(x) = ax * bfun(x-1) 类似规则 eg. n! : ①1! = 1 ②n! = n* (n-1)! def factorial (n): if n==1: return 1 else:return n*factorial(n-1) eg. 阅读全文
posted @ 2017-11-24 16:48 KITEnotKATE 阅读(262) 评论(0) 推荐(0)

Python OR & AND

摘要: These are the Boolean operations, ordered by ascending priority: Priority : () > and > or. not > and > or 1. x = 1, y = 2, ( x or y ) == 2 FALSE cause 阅读全文
posted @ 2017-11-24 16:24 KITEnotKATE 阅读(187) 评论(0) 推荐(0)

Python Memo 赋值与ID (Assignment & id())

摘要: id() copy() deepcopy() y=x 阅读全文
posted @ 2017-11-24 12:10 KITEnotKATE 阅读(392) 评论(0) 推荐(0)