Skip to content

Instantly share code, notes, and snippets.

@MohammadaliMirhamed
Created December 9, 2016 20:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MohammadaliMirhamed/16c70d5f24ee9170aecf77d8faceeb21 to your computer and use it in GitHub Desktop.
Save MohammadaliMirhamed/16c70d5f24ee9170aecf77d8faceeb21 to your computer and use it in GitHub Desktop.
some usefull functions in python for work with string
print "mohammadali".isdigit()
print "123456".isdigit()
print "ABCD".isupper()
print "abcd".islower()
print "".isalnum()
print "Ya Muhammad-Ya ali".split("-")
print "ABCdef".lower()
print "ABCdef".upper()
print "muhammad".replace("u","o",-1)
#--------------------------------------------------------
#--------------------------------------------------------
list=[1,2,"mamali",4,5,6.5,60000,'H']
print list
list.remove(60000)
print list
list.append(60000)
print list
print (("Place Of 'H' In List Array is : ")+str(list.index('H')))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment