Python Forum
Cant Append a word in a line to a list err "str obj has no attribute append
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cant Append a word in a line to a list err "str obj has no attribute append
Hey everyone,

I am trying to get every word in line to a list however i am getting error " AttributeError: 'str' object has no attribute 'append'". Any ideas are welcome, thanks in advance.

if satırsayısı2==isimsatırlistesi[0]:
        for word in line2:
            word.append(str(adressatırı)) #[b]AttributeError: 'str' object has no attribute 'append'[/b]
if satırsayısı2==isimsatırlistesi[0]:
        for word in line2:
You have not supplied enough information. What is line2? What is adressatiri? What are your trying to do with this:

Possibly Related Threads…
Thread Author Replies Views Last Post
  append a string to a modified line Mr_Blue 10 853 Sep-16-2021, 07:24 PM
Last Post: Mr_Blue
Question Problem: Check if a list contains a word and then continue with the next word Mangono 2 607 Aug-12-2021, 04:25 PM
Last Post: palladium
  .json overwrites, rather than append?? Clives 12 1,553 Jun-07-2021, 04:13 PM
Last Post: buran
  Better way to append frames from a video to multiple lists? Balaganesh 0 595 May-13-2021, 07:37 AM
Last Post: Balaganesh
  How to append a value to specific excel cell using openpyxl hobbyist 0 1,820 Mar-05-2021, 07:14 PM
Last Post: hobbyist
  Append excel sheet using openpyxl TammyP 1 791 Feb-02-2021, 06:32 PM
Last Post: nilamo
  How to append multiple <class 'str'> into a single List ahmedwaqas92 2 926 Jan-07-2021, 08:17 AM
Last Post: ahmedwaqas92
  Add a row to a dataframe or append whole dataframe. tsurubaso 1 580 Jan-07-2021, 01:53 AM
Last Post: tsurubaso
  Trying to get the first letter of every word in a list DanielCook 2 831 Jan-05-2021, 05:06 PM
Last Post: deanhystad
  Append 2d empty lists NMMST 2 867 Oct-19-2020, 09:25 PM
Last Post: NMMST

Forum Jump:

User Panel Messages

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