Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
negative to positive slices
#3
In [1]: a='abcdefghijklmnopqrstuvwxyz'

In [2]: a[-6:6:-1]
Out[2]: 'utsrqponmlkjih'
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Messages In This Thread
negative to positive slices - by Skaperen - Jan-28-2018, 05:18 AM
RE: negative to positive slices - by Gribouillis - Jan-28-2018, 05:39 AM
RE: negative to positive slices - by wavic - Jan-28-2018, 08:19 AM
RE: negative to positive slices - by Skaperen - Jan-29-2018, 05:47 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  negative memory usage akbarza 1 285 Apr-27-2024, 08:43 AM
Last Post: Gribouillis
  tuple indices must be integers or slices, not str cybertooth 16 12,076 Nov-02-2023, 01:20 PM
Last Post: brewer32
  Positive integral solutions for Linear Diophantine Equation august 4 1,322 Jan-13-2023, 09:48 PM
Last Post: Gribouillis
  Error "list indices must be integers or slices, not str" dee 2 1,559 Dec-30-2022, 05:38 PM
Last Post: dee
  How to do bar graph with positive and negative values different colors? Mark17 1 5,360 Jun-10-2022, 07:38 PM
Last Post: Mark17
  is there any tool to convert negative base to int? Skaperen 7 2,506 May-27-2022, 07:30 AM
Last Post: Gribouillis
  TypeError: list indices must be integers or slices, not range Anldra12 2 2,740 Apr-22-2022, 10:56 AM
Last Post: Anldra12
  Regex: positive lookbehind Secret 2 2,062 Sep-21-2020, 12:59 AM
Last Post: snippsat
  list indices must be integers or slices, not lists error djwilson0495 2 2,941 Aug-27-2020, 06:13 PM
Last Post: deanhystad
  [Solved]TypeError: list indices must be integers or slices, not str NectDz 3 4,011 Jun-02-2020, 08:21 AM
Last Post: DreamingInsanity

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020