Thread: Some questions

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    1
    Rep Power
    0

    Some questions


    Hello, i new in this forum and i happy to join here !
    I want to ask you some questions please:
    1) How can i check if string had only letters ?
    2) How can i check if string has only numbers ?
    3) How can i check if string is good mail ?
    4) If i want to built a little program that delete all the files from
    the computer, you recommend me to programing this program
    in Python, or in other language ?

    Thanks you .
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Location
    39N 104.28W
    Posts
    158
    Rep Power
    3
    Originally Posted by PTIM
    Hello, i new in this forum and i happy to join here !
    I want to ask you some questions please:
    1) How can i check if string had only letters ?
    2) How can i check if string has only numbers ?
    3) How can i check if string is good mail ?
    4) If i want to built a little program that delete all the files from
    the computer, you recommend me to programing this program
    in Python, or in other language ?

    Thanks you .
    1. .isalpha()
    2. .isdigit()
    3. I'm not sure what is "good" but if you want to see if there's an "@" and it's not the first or last character: "@" in <string>[1:-2]
    4. depending on the operating system, it's probably simpler in the native script (DOS, BASH, etc.)

IMN logo majestic logo threadwatch logo seochat tools logo