Python Forum
item from a line to list however when i print the line instead of words i get letters
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
item from a line to list however when i print the line instead of words i get letters
#5
Looks like i found the solution, using "strip" instead of "split".

 line2=line2.rstrip()
this should be,

 line2=line2.rsplit()
.

I can still take input about creating word document inside python tough :).

(Apr-22-2020, 02:03 PM)anbu23 Wrote:
if satırsayısı2==isimsatırlistesi[0]:
        line2=line2.rstrip()
        for word in line2.split():
            adressatırı.append(word)
            satırdakikelimesayısı=len(adressatırı)

Hah ok looks like you beat me :).
Reply


Messages In This Thread
RE: item from a line to list however when i print the line instead of words i get letters - by Sutsro - Apr-22-2020, 02:13 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Line graph with two superimposed lines sawtooth500 4 346 Apr-02-2024, 08:56 PM
Last Post: sawtooth500
  How to add multi-line comment section? Winfried 1 216 Mar-24-2024, 04:34 PM
Last Post: deanhystad
  break print_format lengthy line akbarza 4 384 Mar-13-2024, 08:35 AM
Last Post: akbarza
  Reading and storing a line of output from pexpect child eagerissac 1 4,271 Feb-20-2024, 05:51 AM
Last Post: ayoshittu
  coma separator is printed on a new line for some reason tester_V 4 495 Feb-02-2024, 06:06 PM
Last Post: tester_V
  problem with spliting line in print akbarza 3 394 Jan-23-2024, 04:11 PM
Last Post: deanhystad
  Unable to understand the meaning of the line of code. jahuja73 0 309 Jan-23-2024, 05:09 AM
Last Post: jahuja73
  Receive Input on Same Line? johnywhy 8 729 Jan-16-2024, 03:45 AM
Last Post: johnywhy
  Reading in of line not working? garynewport 2 852 Sep-19-2023, 02:22 PM
Last Post: snippsat
  Function to count words in a list up to and including Sam Oldman45 15 6,612 Sep-08-2023, 01:10 PM
Last Post: Pedroski55

Forum Jump:

User Panel Messages

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