Check if an element is present within a linked list I am given a task to ask for a number and then check if it is present within a linked list or not.

class Node:
    def __init__(self,item):
        self.data = item
        self.next = None

    def getData(self):
        return self.data

    def getNext(self):
        return self.next

    def setData(self,newdata):
        self.data = newdata

    def setNext(self, newnext):
        self.next = newnext


class Linkedlist:
    def __init__(self):
        self.head = None

    def add_member(self,data):
        temp = Node(data)
        temp.setNext(self.head)
        self.head = temp

    def search_member(self,item):
        current = self.head
        while current != None:
            if current.getData() ==item:
                return True
            else:
                current =current.getNext()
        return False

llist = Linkedlist()
llist.add_member(23)
llist.add_member(98)
llist.add_member(415)
llist.add_member(123)
llist.add_member(981)
llist.add_member(454)
llist.add_member(213)
llist.add_member(198)
llist.add_member(455)
llist.add_member(253)
llist.add_member(978)
llist.add_member(45)
llist.add_member(203)
llist.add_member(918)
llist.add_member(45)
item = int(raw_input("Enter the number you want to search : "))
print llist.search_member(item)


How can I improve this code?
First, you need to realize that Python is not Java. Python is a "consenting adult language." (Watch Raymond Hettinger's talk for more.)

What that means is the bizarre fetish for mutators/accessors/getters and setters that permeates Java and C# doesn't exist in Python. You don't need to write:

class Node:
    def getData(self):    
    def getNext(self):
    def setData(self,newdata):
    def setNext(self, newnext):


Instead, you can just write this:

class Node:
    def __init__(self, data, next=None):
        self.data = data
        self.next = next


And let people access node.data and node.next directly. (Python provides a mechanism, @property, for dealing with the case where you want to turn a member access into a function call. But it's not the first thing to do.)
The next thing that struck me about your code was this:

llist = Linkedlist()
llist.add_member(23)
llist.add_member(98)
llist.add_member(415)
llist.add_member(123)


That's a lot of letters to get 4 numbers into a list. You can, and should, do better!

"How can I do this better," you ask? Well, post it on CodeReview of course! But also, consider how the Python list class (and set, and dict, and tuple, and ...) is initialized. And how the Mutable Sequence Types are expected to work.

Because your code is implementing a "mutable sequence type." So there's no reason that your code shouldn't work the same way. In fact, if you want other people to use your code, you should try to produce as few surprises as possible. Conforming to an existing interface is a good way to do that!
Create an initializer that takes a sequence.

class LinkedList:
    def __init__(self, seq=None):
        ...
        if seq is not None:
            self.extend(sequence)

Implement as many of the mutable sequence operations as possible.
Use the standard method names where possible: clear, extend, append, remove, etc.
Implement special dundermethods (method names with "double-underscores" in them: double-under-methods, or "dundermethods") as needed to make standard Python idioms work:

def __contains__(self, item):
    for i in self:
        ...

def __iter__(self):
    node = self.head

    while node:
        yield node.value
        node = node.next

Implement your test code using standard Python idioms, to prove it's working:

llist = LinkedList([23, 98, 415, 123, 981, 454, 213, 198, ...])

while True:
    item = int(raw_input("Enter a number to search for: "))

    if item in llist:
        print "It's in there!"
    else:
        print "Sorry, don't have that one."