222

Today I learned how to use curly braces in Python for those coming from C style programming languages. I love that this was the accepted answer.

Comments
  • 17
    You can always go from __future__ import braces for curly brace style in Python
  • 8
    Although been using Python as primary language at work just a few months ago, coming from recently Clojure I thought at the first glance that it is some actual syntax. Gotta go to sleep.
  • 6
    Also, you can close your statements with semicolon
  • 5
  • 0
    I don't know much about python 2
    But python 2 definitely support curly braces and semi Colon...
  • 2
    i will downvote this because it's not serious.
  • 1
    It would be nice if a solution was given for those who are switching to c style languages from python.
  • 9
    @tankmohit11 maybe something like this?
  • 2
    Going to try on my next project. Thanks.
  • 1
    feels like home
Add Comment