Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Newbie] Multiple Array
#2
Assuming a string object:

string = 'XA123\nXB124'

print(string)
print(string.replace('\n', ','))
Output:
XA123 XB124 XA123,XB124
Sig:
>>> import this

The UNIX philosophy: "Do one thing, and do it well."

"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse

"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein
Reply


Messages In This Thread
[Newbie] Multiple Array - by azhuda - May-22-2023, 09:19 AM
RE: [Newbie] Multiple Array - by rob101 - May-22-2023, 09:24 AM
RE: [Newbie] Multiple Array - by azhuda - May-23-2023, 04:13 AM
RE: [Newbie] Multiple Array - by azhuda - Jun-01-2023, 04:29 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Multiple conditions when indexing an array with or without np.where noob2305 1 2,745 Oct-25-2020, 02:06 PM
Last Post: jefsummers
  Newbie question to use lambda on multiple columns of a dataframe zydjohn 0 5,864 Jan-23-2018, 06:08 PM
Last Post: zydjohn

Forum Jump:

User Panel Messages

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