Python Forum
String slicing and loop iteration
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
String slicing and loop iteration
#9
As this is under 'General Coding Help' then I would suggest heading to Python documentation, specifically to Text Processing Services

Quote:The modules described in this chapter provide a wide range of string manipulation operations and other text processing services.

Particular attention could be paid to textwrap - Text wrapping and filling. Look at penultimate function at that page - this should do the trick and deliver desired result.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


Messages In This Thread
String slicing and loop iteration - by divyansh - Jun-04-2020, 11:08 PM
RE: String slicing and loop iteration - by divyansh - Jun-04-2020, 11:16 PM
RE: String slicing and loop iteration - by perfringo - Jun-06-2020, 08:06 PM
RE: String slicing and loop iteration - by divyansh - Jun-07-2020, 10:29 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python3 string slicing Luchano55 4 758 Feb-17-2024, 09:40 AM
Last Post: Pedroski55
  Inconsistent loop iteration behavior JonWayn 2 1,089 Dec-10-2022, 06:49 AM
Last Post: JonWayn
  Am I wrong or is Udemy wrong? String Slicing! Mavoz 3 2,885 Nov-05-2022, 11:33 AM
Last Post: Mavoz
  Loop through a list of string oldtrafford 4 1,587 Mar-24-2022, 05:30 PM
Last Post: deanhystad
  Loop through a list of string oldtrafford 3 1,833 Feb-15-2022, 04:42 PM
Last Post: snippsat
  loop for dynamic cut string - cleaner way? korenron 4 2,069 Nov-22-2021, 02:30 PM
Last Post: korenron
  I am trying to reverse a string using loop codinglearner 4 2,253 Sep-28-2021, 10:46 PM
Last Post: Pedroski55
  saving each iteration of a loop sgcgrif3 3 6,925 Jul-27-2021, 01:02 PM
Last Post: DeaD_EyE
  Convert string to JSON using a for loop PG_Breizh 3 3,075 Jan-08-2021, 06:10 PM
Last Post: PG_Breizh
  String slicing divyansh 6 3,511 May-31-2020, 06:15 AM
Last Post: pyzyx3qwerty

Forum Jump:

User Panel Messages

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