我想刪除大字符串(不是文件)中的空行。 這是字符串: The unique begin of a line in my string, after that a content same endline
The unique begin of a line in my string, after that a content same endline
The uniqu
您好我正在製作一個代碼,將輸入變成一種看起來好像您像蛇一樣說話的方式(IDK我很無聊),並在while循環中似乎打印出額外的空白行,我如何更改我的代碼以刪除這些額外的行? 我的代碼: line = input("Line: ")
while line != "":
line = input("Line: ")
line = line.replace('s','sss')