相关疑难解决方法(0)

如何在Python中进行换行(换行)?

我有一长串代码,我希望在多行之间分解.我使用什么,语法是什么?

例如,添加一串字符串,

e = 'a' + 'b' + 'c' + 'd'
Run Code Online (Sandbox Code Playgroud)

并将它分成两行:

e = 'a' + 'b' +
    'c' + 'd'
Run Code Online (Sandbox Code Playgroud)

python syntax line-breaks long-lines

979
推荐指数
9
解决办法
144万
查看次数

当在 C 中的单独行上写入时,反斜杠 \ 如何连接 printf 字符串?

使用 Dev C++ 我正在用 C 做一些有趣的事情并得到这个:

#include<stdio.h>
main()
{
printf("Hello
      world" );
}
Run Code Online (Sandbox Code Playgroud)

^^^^ 在这里我认为输出会像“你好(带空格)世界”但是错误:

C:\Users\ASUS\Documents\Dev C++ Programs\helloWorldDk.c In function 'main':
5   10  C:\Users\ASUS\Documents\Dev C++ Programs\helloWorldDk.c [Warning] missing terminating " character
5   3   C:\Users\ASUS\Documents\Dev C++ Programs\helloWorldDk.c [Error] missing terminating " character
6   8   C:\Users\ASUS\Documents\Dev C++ Programs\helloWorldDk.c [Warning] missing terminating " character
6   1   C:\Users\ASUS\Documents\Dev C++ Programs\helloWorldDk.c [Error] missing terminating " character
6   1   C:\Users\ASUS\Documents\Dev C++ Programs\helloWorldDk.c [Error] 'world' undeclared (first use in this function)
6   1   C:\Users\ASUS\Documents\Dev C++ Programs\helloWorldDk.c [Note] …
Run Code Online (Sandbox Code Playgroud)

c printf backslash

2
推荐指数
1
解决办法
72
查看次数

标签 统计

backslash ×1

c ×1

line-breaks ×1

long-lines ×1

printf ×1

python ×1

syntax ×1