•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Python section within the Software Development category of DaniWeb, a massive community of 391,708 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,428 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Python advertiser:
Views: 321 | Replies: 4 | Solved
![]() |
Something like this should do:
python Syntax (Toggle Plain Text)
s = 'xxxxx - xxxxx' space = ' ' nospace = '' s = s.replace(space, nospace) print s # xxxxx-xxxxx
drink her pretty
•
•
Join Date: Mar 2007
Posts: 37
Reputation:
Rep Power: 2
Solved Threads: 10
>>> s = 'XXXXX -\n\t XXXX' >>> ''.join(s.split()) 'XXXXX-XXXX' >>>
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Python Marketplace
- javascript works in IE but not working in firefox (JavaScript / DHTML / AJAX)
Other Threads in the Python Forum
- Previous Thread: RE:Python path using Batch File
- Next Thread: Need a python tFTP open source class library



Linear Mode