snbk97

Acronym

Jul 20th, 2015
338
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  1. #sayan bhowmik
  2. string="Light Amplification by the Simulated Emission of Radiation"
  3. print("\n\n")
  4. contain=""
  5.  
  6.  
  7. z=string.split(" ")
  8. l=len(z)
  9. emp=""
  10.  
  11.  
  12. '''|SORING BLOCK|'''
  13.  
  14. for x in range(0,l,1):
  15.     esc=z[x]
  16.     if (z[x]=="by" or z[x]=="the" or z[x]=="of"):
  17.         esc=z[x+1]
  18.  
  19.  
  20.     emp=emp+" "+esc
  21.  
  22.  
  23. print emp
  24.  
  25.  
  26. '''
  27.     =====================
  28.        Acronym Block
  29.     =====================
  30.  
  31.     for i in range(0,l):
  32.    fi=x[i]
  33.    if (fi==" "):
  34.        fi=x[i+1]
  35.        contain=contain+fi
  36.  
  37. final=str((x[0]+contain));print final.upper()
  38. '''
Advertisement
Add Comment
Please, Sign In to add comment