In [2]: s = "\t q" In [3]: print s q In [4]: s.split()[0] Out[4]: 'q' In [5]: s.split(' ',1)[0] Out[5]: '\t'