Python Forum
Split string into 160-character chunks while adding text to each part
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Split string into 160-character chunks while adding text to each part
#4
Use a for loop
message = 'long message'
#Some predefined variables
for i in message:
    #code here
If i was able to do it with a for loop you can too
Reply


Messages In This Thread
RE: Split string into 160-character chunks while adding text to each part - by SheeppOSU - Apr-30-2019, 11:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Reading a text until matched string and print it as a single line cananb 1 2,068 Nov-29-2020, 01:38 PM
Last Post: DPaul
  Replacing a few characters of a specified character but not all of them from a string fatherted99 7 3,314 Aug-13-2020, 09:08 AM
Last Post: fatherted99
  Appending to a text string syno7878 10 4,327 May-03-2020, 10:05 AM
Last Post: snippsat
  Using an integer to manipulate a string/text variable rexyboy2121 1 1,807 Apr-22-2020, 01:37 AM
Last Post: michael1789
  Adding string numbers, while loop and exit without input. Jose 11 7,628 Apr-15-2020, 08:34 AM
Last Post: Jose
  Trying to extract Only the capitol letters from a string of text Jaethan 2 2,216 Feb-27-2020, 11:19 PM
Last Post: Marbelous
  How to change part of the value string in Python Dictionary? sbabu 11 4,017 Feb-12-2020, 02:25 AM
Last Post: sbabu
  Tab character in a string prints 8 spaces hecresper 6 20,793 Aug-27-2019, 02:38 PM
Last Post: snippsat
  Split String lekuru01 6 3,595 Mar-19-2019, 10:42 AM
Last Post: lekuru01
  Finding and storing all string with character A at middle position Pippi 2 2,731 Jan-20-2019, 08:23 AM
Last Post: Pippi

Forum Jump:

User Panel Messages

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