2019獨角獸企業重金招聘Python工程師標準>>>
def contract_str():index = 8db_size = 8new_table_name = 'b''_'+str(index & (db_size-1))print new_table_name
ImportError: No module named mysql.connector
import mysql.connector as sql_connector
Python保存時提示“SyntaxError: Non-ASCII character '\xe8' in file”
# -*- coding: utf-8 -*-
?
?
IOError: [Errno 21] Is a directory: 'logs/a/a'
沒有指定文件或目錄名稱
logging自定義
https://cloud.tencent.com/developer/article/1354396
?
判斷文件是否存在的方法
https://www.cnblogs.com/jhao/p/7243043.html
?
python獲取同級文件夾名
os.path.join(os.path.dirname(os.getcwd()), dir_path)
?
python 中的循環
for a in rang(10):
python 中join的用法
https://www.cnblogs.com/jsplyy/p/5634640.html
?
python 中數字轉字符串
https://www.cnblogs.com/stuqx/p/7291920.html