del Keyword 注意del是python关键字,就像def.and.or一样.它不是字典.列表的方法,但是可以用来删除字典.列表的元素.比如: del list_item[4] del dictionary["a"] 除此之外,还可以用del删除变量.比如: del foo del好用,含义也非常的清晰,以后在适当的场景可以用起来.…
小测试 in del.py import datetime cur = datetime.datetime.now() num = 1 a_list = {"a":1, "b":2, "c":3} while num < 100000: if "a" in a_list: pass num += 1 now = datetime.datetime.now() print (now - cur).total_seconds…
一.环境:Windows XP + Python3.2 1. dll对应的源文件(m.cpp): #include <stdio.h> extern "C" { _declspec(dllexport) int add(int a, int b) { return a+b; } _declspec(dllexport) void print_sum(unsigned long ulNum) { ) { printf("The ulNum is : %u\n&quo…