Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
py2js27657yThen import print function from future module as printf and voila your problem is solved
-
@arpit1997 my take on it would have been
globals()["printf"] = print
At the beginning of the program -
@snoopy true, but my version would also work in a function. Even though i don't know if you ever would like to add the printf-function via function/method ^^"
-
rfc716828007y@Condor Oh, absolutely.
After writing something I still go through the code removing all superfluous semicolons ... 😅 -
Forside14597y@Condor In fact, if you start using a language without semicolons, you wonder why you ever had to use ones in the first place. I recently switched from Java to Kotlin, worked with Kotlin for weeks and then made a little program in C. I had so many errors because of missing semicolons, and suddenly I was thinking why the heck does it even need them.
Related Rants
Python is a wonderful language.
But apparently the C syntax is still so deeply engrained in my mind that I get errors when using "printf()" instead of "print()" on a regular basis. m)
rant
c
python
print("confusion!")