Reading .dat file with fixed column width
Question: The code I use in SAS

    
    
    Options symbolgen ps=10000;
    Data span_nonspan;
    INFILE 'C:\September 2016\SAMPLE.dat'; 
       INPUT @1     XYZ       $10.
             @11    ABC       $7.         
             @18    PM        $3.
    run;
    

Can anyone please help me how to write in Python 3.5 to read data same way, I
am new to Python and any help would be really appreciated.

The data would look something like below:

    
    
    5085489966001001600220161002191219    1P  106SCHWARTZ
    


Answer: 
    import pandas as p
    data = p.read_fwf("filename", colspecs=[(0,10),(11,17),(17,20),(20,24)],names=['DP','PHONETYPE','MARKET','FOLDER'])
    data.head()
    

