LIBSVM is used to read the data from a tuple containing two lists. The first list contains the classes and the second list contains the input data. You can create a simple dataset with two possible classes you also need to specify which kernel you want to use by creating svm_parameter.
>> from libsvm import *
>> prob = svm_problem([1,-1],[[1,0,1],[-1,0,-1]])
>> param = svm_parameter(kernel_type = LINEAR, C = 10)
## training the model
>> m = svm_model(prob, param)
#testing the model
>> m.predict([1, 1, 1])
Hope this answer helps.
If you want to learn Python visit this Python course.