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
#1
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]
            satırdakikelimesayısı=len(adressatırı)
            print(adressatırı[2:satırdakikelimesayısı])
Reply


Messages In This Thread
Cant Append a word in a line to a list err "str obj has no attribute append - by Sutsro - Apr-22-2020, 11:11 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to append a value to specific excel cell using openpyxl hobbyist 0 316 Mar-05-2021, 07:14 PM
Last Post: hobbyist
  Append excel sheet using openpyxl TammyP 1 305 Feb-02-2021, 06:32 PM
Last Post: nilamo
  How to append multiple <class 'str'> into a single List ahmedwaqas92 2 369 Jan-07-2021, 08:17 AM
Last Post: ahmedwaqas92
  Add a row to a dataframe or append whole dataframe. tsurubaso 1 242 Jan-07-2021, 01:53 AM
Last Post: tsurubaso
  Trying to get the first letter of every word in a list DanielCook 2 331 Jan-05-2021, 05:06 PM
Last Post: deanhystad
  Append 2d empty lists NMMST 2 335 Oct-19-2020, 09:25 PM
Last Post: NMMST
  How to append to a set in Python dgrunwal 7 575 Oct-01-2020, 04:27 PM
Last Post: ndc85430
  Passing List of Objects in Command Line Python usman 7 778 Sep-27-2020, 03:45 PM
Last Post: ndc85430
  How to append to list a function output? rama27 5 673 Aug-24-2020, 10:53 AM
Last Post: DeaD_EyE
  Including modules in Python using sys.path.append JoeDainton123 1 587 Aug-24-2020, 04:51 AM
Last Post: millpond

Forum Jump:

User Panel Messages

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