Posts

Showing posts from August, 2014

How to remove duplicates item from a list using Python

Python is very easy but you have to think just like python   def remove_dulicates(alist): elist =[] #define an empty for new list without duplicate item for i in alist: if i not in elist: elist.append(i) return elist print remove_dulicates([2,2,2,1,3,4,5]) output:[2, 1, 3, 4, 5]

Remove vowels from a string using Python or Anti- Vowel

Removing vowels from text is very easy using python. But through internet search I found very hard way to do this. Just look the following links http://stackoverflow.com/questions/23176001/remove-vowels-from-a-string http://stackoverflow.com/questions/17299581/loop-forgets-to-remove-some-items http://pythonfiddle.com/remove-the-vowels/ But removing vowel could be done very easy and clean way, Just have a look   def anti_vowel(text): for char in text: if char in "aeiouAEIOU": text= text.replace(char, "") # Here vowel will be replaced by "" return text

Super simple way to send Facebook Messages Without Downloading Messenger

Image
It is known to all that Facebook recently removed messaging option from its main app and insisting user to download Facebook Messenger Apps to continue messaging from mobile. Facebook user are pretty annoyed to download and use a separate apps for messaging only. But there is still a way to use Facebook messaging without download messenger apps. For this go to Facebook.com by using your mobile browser (Chrome, Firefox or any others ) and you'll be able to send and receive messages just like you would on a desktop.   To make easy log on Facebook from your mobile browser  you can create a short-cut for Facebook.com.To create short-cut & to add it on home screen Tab on"Add to homescreen". See the bellow picture.

How to run Python code from Sublime Text 2?

 To set up a complete Python IDE in Sublime Text 2. Go to Tools -> Build System -> (choose) Python then To Run your code:   Ctrl   +  B (For Windows) CMD + B (For OSX ) )     Enjoy Sublime Text 2         Update: You can use same rule to setup Sublime Text 3