30
rfc7168
7y

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)

Comments
  • 5
    Then import print function from future module as printf and voila your problem is solved
  • 1
    @arpit1997 my take on it would have been
    globals()["printf"] = print

    At the beginning of the program
  • 1
    @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 ^^"
  • 0
    @Condor Oh, absolutely.
    After writing something I still go through the code removing all superfluous semicolons ... 😅
  • 1
    @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.
  • 1
    Oh yeah? I typed ctrl c then :wq in microsoft word the other day...
Add Comment