摘要:
00 There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity 阅读全文
摘要:
But failed with time exceed. The one with better solution is shown as below: Much simpler. Ich denke, dass muss ich härter arbeiten. Nächste Station, 阅读全文
摘要:
00-- issubclass(class,classinfo) to check if the class are the child of the Class in classinfo( can be a list ) 01-- isinstance (object, classinfo) to 阅读全文
摘要:
00-- class, class object, instance object As shown below, Tracking is a class, and itself it's own class oject. in the object, __dict__ will have all 阅读全文
摘要:
00-- requirements a. to define a class of Point and a class of Line with Point as parent b. define a function in Line to calculate the lenth of 2 poin 阅读全文
摘要:
01--Define a class for ticket price calculation Running Result: referred: http://outofmemory.cn/code-snippet/3841/python-datetime-weekday-get-day-of-w 阅读全文
摘要:
00--Define a Class with properties and related functions and try to create a instance Running Result: 001-- Class to reduce duplicate work, we will us 阅读全文
摘要:
0-- make use of easygui to recode the game of number guessing: 01-- multenterbox 002-- usage of fileopenbox and textopenbox: 003--textopenbox and chec 阅读全文
摘要:
00-- In python, else can be used with if; while; try 01-- using "with", we can open a file without f.close(): 002-- make use of exception to make the 阅读全文
摘要:
00-- we can use Try, Except, Finally to handle the Exceptions Oder 001: use Try and Except to handle the exceptions in the code : 002-- usage of raise 阅读全文