User Profile

Collapse

Profile Sidebar

Collapse
RaZe
RaZe
Last Activity: Jul 14 '08, 09:01 AM
Joined: Jul 13 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • RaZe
    started a topic find the index of a pattern occurred in a string

    find the index of a pattern occurred in a string

    Hi,

    I am absolutely a beginner in Python. How can I find an index of a regular expression pattern if it matches within a string? For example a string: 'abc:def' and I want to get the index of ':' (colon) using the regular expression such as r'[^\w\s]. JAVA supports regular expression in the version of 'indexOf ()' function. How these could be done in Python?

    Thanks.
    See more | Go to post

  • RaZe
    replied to using multiple 'if' statements in Python
    OOPS! Sorry for that. Actually I got some errors in my regular expressions and assumed it as for that multiple 'if' statements!!!! Now I figured it out and solved it.

    Sorry for the inconvenience :-)
    See more | Go to post

    Leave a comment:


  • RaZe
    started a topic using multiple 'if' statements in Python

    using multiple 'if' statements in Python

    Hi All,

    Can anyone please help me out about how can I use multiple 'if' statements in Python like C/C++?

    For example in C:
    *************** **************
    int a;
    a = 0;

    if ( a == 0 ) {
    printf "0";
    a = 1;
    }
    if ( a == 1 ) printf "1";
    *************** ***************
    How can I write these statements in Python Code?
    ...
    See more | Go to post
No activity results to display
Show More
Working...