用户登录
用户注册

分享至

如何编写“标签"?在 Python 中?

  • 作者: 银河系宇宙皇家FUV设计总监
  • 来源: 51数据库
  • 2022-10-25

问题描述

假设我有一个文件.你好"TABalex"怎么写?

Let's say I have a file. How do I write "hello" TAB "alex"?

推荐答案

代码如下:

f = open(filename, 'w')
f.write("hello	alex")

字符串中的 是水平制表的转义序列.

The inside the string is the escape sequence for the horizontal tabulation.

软件
前端设计
程序设计
Java相关