摘要:
#!/usr/bin/python3 # -*- coding: utf-8 -*- import json data = {'name':'张森','email':'zhangsen@qq.com'} data = json.dumps(data, sort_keys=True, indent=2) data = data.encode('utf-8').decode('unicode_esc... 阅读全文
摘要:
#!/usr/bin/python3 # -*- coding: utf-8 -*- test = "username\tmail\tage\nzhangsen\tzhangsen@qq.com\t25" print(test.expandtabs(20)) 阅读全文
摘要:
#!/usr/bin/python3 # -*- coding: utf-8 -*- test = "今天吃了吗" test = "_".join(test) print(test) 今_天_吃_了_吗 test = "今天吃了吗" test = " ".join(test) print(test) 今 天 吃 了 吗 阅读全文