Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with slicing a list
#3
Thats a great idea!

Now I was doing my program so that text like "Hello!" would be ciphered to
Output:
144042209809346⟚20030551517791⟚49461787026128⟚49461787026128⟚63810974923268⟚268587913534804⟚FHHTZZZFHHIGG
If the text was longer the letters (which is then transformed into the "seed" of the cipher) would be in between the numbers.

I'm using that special character, that I don't think anyone uses, as a marker for where each number starts and ends. This makes it easier to split the string each time there is a ⟚ and add it to a list of numbers that then decipher each number in a character.

What do you think about this approach?

If I use the method you said the marker would have to always be the same number for the program to recognize it or a number that has always the same number of figures. For example the marker would have to be a number of max 6 figures so it would be between 100000 and 999999. And I would still need to use a seed so that the value for each character always changes, even when you cipher the same text.
But it would be more safe than the method I'm using now so it's a good idea. I will see how I end up doing it. Thanks for your help.
Reply


Messages In This Thread
Help with slicing a list - by FWendeburg - Nov-28-2019, 05:47 PM
RE: Help with slicing a list - by michael1789 - Nov-29-2019, 09:14 PM
RE: Help with slicing a list - by FWendeburg - Nov-30-2019, 06:16 PM
RE: Help with slicing a list - by michael1789 - Dec-02-2019, 04:57 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  slicing and indexing a list example leodavinci1990 4 3,248 Oct-12-2020, 06:39 AM
Last Post: bowlofred
  List slicing issue Irhcsa 3 3,774 Apr-26-2019, 09:16 PM
Last Post: nilamo
  Slicing Python list of strings into individual characters Drone4four 5 5,290 Apr-17-2019, 07:22 AM
Last Post: perfringo
  String Slicing in List Comphrensions Patroclus72790 1 2,876 Mar-21-2019, 09:33 PM
Last Post: nilamo
  Slicing a complex dictionary and list Drone4four 2 7,828 Aug-16-2018, 02:27 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

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