What does [::-1] means in Python?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jorinos
    New Member
    • Jul 2012
    • 1

    What does [::-1] means in Python?

    what does [::-1] means in python?
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    That represents an extended slice. The "-1" represents the stride.

    Extended slices

    Comment

    • numberwhun
      Recognized Expert Moderator Specialist
      • May 2007
      • 3467

      #3
      For your reference, @jorinos.

      Comment

      Working...