敲了很多字母当例子,首先要知道一个\t占4位,如果前面的字符位数不够4位就补到4位,刚好够4位就多加一个\t,这个用图表解释最清晰
字符最好不要太多,太多了,会冲出当前\t,到下一个\t了,暂时没找到更好的解决办法,本人初学者请多多指教~~~
print("hahahahah\thehe")
print("hehe\tdfvdfvs")
print("hello\tworld")
print("hellooo\tworld")
print("helloooooooo\twwworld")
运行结果如下:
原理解释:
参考文章:
https://blog.csdn.net/2202_75705395/article/details/129212329?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-129212329-blog-128795289.235%5Ev38%5Epc_relevant_anti_vip&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-129212329-blog-128795289.235%5Ev38%5Epc_relevant_anti_vip&utm_relevant_index=2https://blog.csdn.net/2202_75705395/article/details/129212329?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2~default~CTRLIST~Rate-1-129212329-blog-128795289.235%5Ev38%5Epc_relevant_anti_vip&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2~default~CTRLIST~Rate-1-129212329-blog-128795289.235%5Ev38%5Epc_relevant_anti_vip&utm_relevant_index=2
https://blog.csdn.net/qq_40061206/article/details/128269849?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522168957750616800192242906%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=168957750616800192242906&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~baidu_landing_v2~default-2-128269849-null-null.142^v88^control_2,239^v2^insert_chatgpt&utm_term=python%E5%A4%9A%E8%A1%8C%E8%BE%93%E5%87%BA%E5%AF%B9%E9%BD%90&spm=1018.2226.3001.4187https://blog.csdn.net/qq_40061206/article/details/128269849?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522168957750616800192242906%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=168957750616800192242906&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~baidu_landing_v2~default-2-128269849-null-null.142%5Ev88%5Econtrol_2,239%5Ev2%5Einsert_chatgpt&utm_term=python%E5%A4%9A%E8%A1%8C%E8%BE%93%E5%87%BA%E5%AF%B9%E9%BD%90&spm=1018.2226.3001.4187