Guest User

Untitled

a guest
Jan 19th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.97 KB | None | 0 0
  1. import re;
  2. lines = (open("hw1-train.txt")).readlines();
  3. re.split(': |\[|,|\]',lines[0]);
  4.  
  5. ==>
  6. ['A', '', '0.6907749554132048', '-5.36651545721476', '-0.7828926361457288', '-2.229203985935783', '2.4942124896726767', '1.1981850636728097', '0.967217382101899', '-2.9981011856952042', '-0.1638264020036334', '2.419282095530926', '-2.344339076935903', '-2.228973917577817', '0.9877279330122891', '-1.3222828989127418', '0.7592286604915792', '1.1483803662769072', '-7.586389742219602', '2.06120200532449', '-0.9241407578478669', '-1.044495473489863', '-5.557476079882109', '-0.7752199956591885', '7.215333058824548', '0.8728418978596106', '0.9512588133245585', '5.546422579580145', '0.49618780418079106', '-0.468524343441709', '-0.8764082332146983', '-2.9633326067502828', '3.254215124112812', '4.475557101678692', '1.8271061271998352', '0.7809304355841843', '-7.539713932067616', '4.431418483672097', '-2.9275681608406976', '-0.8758532890990348', '4.4287071950812456', '-3.3444971957378264', '\n']
Add Comment
Please, Sign In to add comment