About 3,390,000 results
Open links in new tab
  1. How the '\\n' symbol works in python - Stack Overflow

    Can someone explain how the '\n' works outside the print function and yet my standard output knows to get a new line? Also what is the meaning of the comma symbols in the first …

  2. What does end=' ' in a print call exactly do? - Stack Overflow

    Jul 16, 2023 · @NilaniAlgiriyage I've also found that question and I don't think it's a duplicate. The question you found is mainly discussing the difference between Python2 and Python3 since …

  3. python - How can I use newline '\n' in an f-string to format a list of ...

    Jun 27, 2017 · The other answers give ideas for how to put the newline character into a f-string field. However, I would argue that for the example the OP gave (which may or may not be …

  4. What do operations n % 2 == 1 and n //= 2 do in Python?

    Dec 27, 2020 · 6 n % 2 == 1 means to return True if the remainder of n / 2 equals to one, the same as checking if n is an odd number. So if n equals to 6, the above expression will return …

  5. What does the percentage sign mean in Python - Stack Overflow

    Apr 25, 2017 · What does the percentage sign mean? It's an operator in Python that can mean several things depending on the context. A lot of what follows was already mentioned (or …

  6. python - What exactly does += do? - Stack Overflow

    What exactly do we mean by "storing the result in a"? python variables don't store values directly they store references to objects. In python the answers to both of these questions depend on …

  7. What does [:-1] mean/do in python? - Stack Overflow

    Mar 20, 2013 · Working on a python assignment and was curious as to what [:-1] means in the context of the following code: instructions = f.readline()[:-1] Have searched on here on S.O. …

  8. How does Python split() function works - Stack Overflow

    Dec 4, 2016 · Raw string vs Python string r'","' The r is to indicate it's a raw string. How is a raw string different to a regular python string? The special characters lose their special meaning …

  9. python - Meaning of end='' in the statement print ("\t",end ...

    4 See the documentation for the print function: print () The content of end is printed after the thing you want to print. By default it contains a newline ("\n") but it can be changed to something …

  10. syntax - What do >> and << mean in Python? - Stack Overflow

    Apr 3, 2014 · 15 The other case involving print >>obj, "Hello World" is the "print chevron" syntax for the print statement in Python 2 (removed in Python 3, replaced by the file argument of the …