Python中的字符串操作函数split 和 join能够实现字符串和列表之间的简单转换, 使用 .split()可以将字符串中特定部分以多个字符的形式,存储成列表 def split(self, *args, **kwargs): # real signature unknown """ Return a list of the words in the string, using sep as the delimiter string. sep The delimiter
一.算法优化: 减少分支优化 // 求绝对值 int MyAbs(int n) { if (n < 0) { n = ~n + 1; } return n; } // 优化 int MyAbs(int n) { // 利用符号位优化 n 的符号位(最高位) n>=0 符号位为0 n < 0 时 符号位为1 // 左移31位 n = 0x00000000 n = 0xffffffff int m = n >> 31; // if(n>=0) m=0 else m = 0x