They are used for formatting strings. %d acts as a placeholder for a number %s used for a placeholder in a string
|
Python
Need someone to mentor me |
|
Mar 3, 2017 11:08 AM
(This post was last modified: Mar 3, 2017 11:15 AM by theCRAZYshow.)
***********SORRY""""""this this this this this this this
Are you still looking for someone. If so can you PM me. I am unable to do so yet.
Mar 3, 2017 11:01 PM
(This post was last modified: Mar 3, 2017 11:04 PM by obby.)
(Mar 1, 2017 08:35 AM)(╯°□°)╯︵ ┻━━┻ Wrote: Python 2 has print as a statement where Python 3 has print as a function (the parentheses). I wanted to elaborate on this, this is a 100% correct answer in case specifically for print, but I wanted to answer it more broadly. I'd also like to say that IMO print should always be used as a function unless you're in a specific environment where you can't so it's interchangeable. Anyways, () refers to calling a function, print in python2 is not a function it's a statement. Lets say we refer to a function but don't call it like Code def func(x):This alone won't execute the function but Code def func(x):will. We can go on to do fun things like Code def handleChoiceOne():Also OP, if you want an immediate answer I'm usually available skype: live:obnoxious_16 |
|
|


![[Image: IqK5FY6.png]](https://i.imgur.com/IqK5FY6.png)