CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: aakashdata

Search: Search took 0.06 seconds.

  1. Replies
    11
    Views
    18,360

    Re: Palindromes in Python

    A palindrome is a phrase, a word, or a sequence that reads the same forward and backward. One such example will be pip! An example of such a phrase will be ‘nurses run’. Let’s implement it, shall we?...
  2. Replies
    2
    Views
    7,694

    Re: Remove Whitespaces from the string

    I can think of two ways to do this.

    Using join-
    >>> s='aaa bbb ccc ddd eee'
    >>> s1=''.join(s.split())
    >>> s1
    ‘aaabbbcccdddeee’

    Using a list comprehension-
    >>> s='aaa bbb ccc ddd eee'
Results 1 to 2 of 2





Click Here to Expand Forum to Full Width

Featured