Python Forum
Regarding concatenation of a list to a string
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regarding concatenation of a list to a string
#3
The reason the second version works is that you converted the list to a string with the str() built-in. So you are adding two strings instead of a list and a string.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
RE: Regarding concatenation of a list to a string - by ichabod801 - Aug-19-2018, 12:57 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries sawtooth500 14 1,201 Apr-24-2024, 01:42 AM
Last Post: sawtooth500
  FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries i sawtooth500 3 2,252 Mar-22-2024, 03:08 AM
Last Post: deanhystad
  String concatenation in SQL update statement hammer 3 1,633 Feb-24-2022, 08:00 PM
Last Post: hammer
  f string concatenation problem growSeb 3 2,351 Jun-28-2021, 05:00 AM
Last Post: buran
  Concatenation ?? ridgerunnersjw 1 1,789 Sep-26-2020, 07:29 PM
Last Post: deanhystad
  I converted string to 'list', but it doesn't look like a list! mrapple2020 3 3,341 Apr-07-2019, 02:34 PM
Last Post: mrapple2020
  Combining two strings together (not concatenation) DreamingInsanity 6 3,254 Mar-29-2019, 04:32 PM
Last Post: DreamingInsanity
  Create Alert if string from list appears on other list javalava 1 2,575 Sep-17-2018, 02:44 PM
Last Post: DeaD_EyE
  List of pathlib.Paths Not Ordered As Same List of Same String Filenames QbLearningPython 20 15,824 Nov-16-2017, 04:47 PM
Last Post: QbLearningPython
  Create a new list by comparing values in a list and string DBS 2 3,618 Jan-14-2017, 07:59 AM
Last Post: Yoriz

Forum Jump:

User Panel Messages

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