Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #41524
| Date | 2013-03-19 11:36 -0400 |
|---|---|
| Subject | Replace "dash" values in a field with new line- VB equivalent of Python |
| From | Cathy James <nambo4jb@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3521.1363707421.2939.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
Dear All,
I need some assistance with Python so that values in the "Name" field e.g.
Murray - James - Leo can be labeled as:
Murray
James
Leo
with a new line replacing every dash.
Basically I need the equivalent of this VB in Python:
replace ( [Name] , "-", vbNewLine)
I tried this but no luck:
str.[Name].replace("-", "\n")
str.[Name].replace("-", \n)
[Name].replace("-", \n")
Your help is appreciated
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Replace "dash" values in a field with new line- VB equivalent of Python Cathy James <nambo4jb@gmail.com> - 2013-03-19 11:36 -0400 Re: Replace "dash" values in a field with new line- VB equivalent of Python Neil Cerutti <neilc@norwich.edu> - 2013-03-19 15:52 +0000 Re: Replace "dash" values in a field with new line- VB equivalent of Python rusi <rustompmody@gmail.com> - 2013-03-19 08:59 -0700
csiph-web