indentation in python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • lee

    #1

    indentation in python

    Can anyone tell me the basics about indentation in python......how we
    use it in loops and constructs..etc ....

  • BartlebyScrivener

    #2
    Re: indentation in python

    lee wrote:
    Can anyone tell me the basics about indentation in python......how we
    use it in loops and constructs..etc ....


    Comment

    • Dan Bishop

      #3
      Re: indentation in python

      On Jan 13, 8:49 pm, "lee" <libi...@gmail. comwrote:
      Can anyone tell me the basics about indentation in python......how we
      use it in loops and constructs..etc ....
      It's just like indentation in other languages, except that it's
      syntactically required.

      Comment

      • Wolfgang Grafen

        #4
        Re: indentation in python

        Dan Bishop wrote:
        On Jan 13, 8:49 pm, "lee" <libi...@gmail. comwrote:
        >Can anyone tell me the basics about indentation in python......how we
        >use it in loops and constructs..etc ....
        >
        It's just like indentation in other languages, except that it's
        syntactically required.
        >
        The indent rule is minimal:
        - indent the following line after a colon (:)
        - dedent when you leave that block to the level you wish to continue
        - you cannot have an empty block; use pass or None for an otherwise empty block
        - as always: have fun!

        Comment

        Working...