Python Forum
enter string into list according to a known rule
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
enter string into list according to a known rule
#10
So, it's str why do you keep working with str, when you can work with original bytearay or list? The conversion to str was on your insistence in order to replicate the str representation of data in str representation of Message.
Looking further in your code, you convert this string to list
and you pass StartByte=5 and length=1. In your code you decrease StartByte by 1. So you want 1 element at index 4 and that is a9. What do you want/expect to get?
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
RE: enter string into list according to a known rule - by buran - Aug-12-2021, 07:22 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python rule about the space character surrounding the equal sign ineuw 10 1,846 Sep-21-2023, 09:17 AM
Last Post: ineuw
  Pythone module for dynamic rule execution hemal07yc 1 9,094 Sep-13-2019, 11:25 AM
Last Post: luoheng
  I converted string to 'list', but it doesn't look like a list! mrapple2020 3 3,342 Apr-07-2019, 02:34 PM
Last Post: mrapple2020
  Create Alert if string from list appears on other list javalava 1 2,575 Sep-17-2018, 02:44 PM
Last Post: DeaD_EyE
  List of pathlib.Paths Not Ordered As Same List of Same String Filenames QbLearningPython 20 15,833 Nov-16-2017, 04:47 PM
Last Post: QbLearningPython
  Create a new list by comparing values in a list and string DBS 2 3,618 Jan-14-2017, 07:59 AM
Last Post: Yoriz

Forum Jump:

User Panel Messages

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