Python Forum
Wrap from end to beginning. 27 to 1, 28 to 2 etc
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wrap from end to beginning. 27 to 1, 28 to 2 etc
#4
It works perfectly for postive numbers but for any negative number (-5 % 1) gives me 0. Is there another option for negative numbers?
Thanks,
Dream.

I have tried this code:
over_limit = num
        if int(over_limit) > max_limit:
            left_over = over_limit % 26
            caeserint.append(left_over)
But I am still getting a KeyError.
Any help?
Reply


Messages In This Thread
RE: Wrap from end to beginning. 27 to 1, 28 to 2 etc - by DreamingInsanity - Jun-24-2018, 08:15 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Just beginning dalekeel 2 332 Apr-15-2024, 11:49 AM
Last Post: Pedroski55
  Program doesnt return beginning bilisim19 2 982 Feb-15-2023, 06:23 PM
Last Post: Larz60+
  List of dataframe values beginning with x,y or z glidecode 3 1,992 Nov-08-2021, 10:16 PM
Last Post: glidecode
  How to start the program from the beginning. iamaghost 5 3,046 Feb-23-2021, 03:40 AM
Last Post: deanhystad
  Python Dev suggestion: Combining line-wrap with comments inside functions NikoNiels 2 1,779 Sep-26-2020, 07:45 PM
Last Post: bowlofred
  want to change the beginning of the result Rudinirudini 5 3,674 Nov-15-2018, 11:28 AM
Last Post: Rudinirudini
  Beginning of Beginner Help: Should I start with Python? appdevelnewb 2 3,124 Jul-23-2018, 11:17 PM
Last Post: appdevelnewb
  How to Loop CSV File Beginning at Specific Row? bmccollum 5 40,477 Nov-05-2017, 11:04 PM
Last Post: bmccollum
  Need help for beginning coding sylas 13 8,428 Mar-28-2017, 06:36 AM
Last Post: sylas

Forum Jump:

User Panel Messages

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