瀏覽代碼

Update 06-basics.md

Example with line ending did not worked in python shell
added ;
GilianHuber 11 年之前
父節點
當前提交
6bfaab6ac8
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      06-basics.md

+ 2 - 3
06-basics.md

@@ -179,13 +179,12 @@ detailed specifications such as:
 
 Since we are discussing formatting, note that `print()` always ends
 with an invisible "new line" character (`\n`) so that repeated calls
-to `print()` will all print on a separate line each. To prevent this
+to `print()` will all print on a separate line each.You can change print commands with a semikolon. To prevent this
 newline character from being printed, you can override the `end`
 parameter to `print`:
 
 ~~~python
-print("a", end="")
-print("b", end="")
+print("a", end="");print("b", end="")
 ~~~
 
 Output: