Python Forum
Repeat keywords at end of every line
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Repeat keywords at end of every line
#5
Python has duck-typing and for me this is 'assignment type'.

Quote:When I see a bird that walks like a duck and swims like a duck and quacks like a duck, I call that bird a duck.

--James Whitcomb Riley

I also observe that the description is ambiguous or missing some vital points.

That aside I would recommend break task at hand into smaller subtasks. Something like:

- how to open the file and iterate it row-by-row
- how to determine whether row (string) contains specific substring
- how to copy from position X to position Y
- how to add to the string at specific position, even if it's out of bounds
- how to write to file

All these subtasks are simple enough to solve and combining them all together should give solution.
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
Repeat keywords at end of every line - by knob - Sep-15-2020, 02:01 AM
RE: Repeat keywords at end of every line - by knob - Sep-15-2020, 02:30 AM
RE: Repeat keywords at end of every line - by perfringo - Sep-15-2020, 06:38 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Repeat question (for loop) rs74 7 6,531 Jun-17-2020, 03:17 PM
Last Post: rs74
  How to repeat input line of code until condition is met Reta 2 3,404 May-14-2019, 10:06 PM
Last Post: nilamo
  Need help with Keywords in Python Zaprios 3 74,934 Mar-23-2017, 07:52 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

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