daily pastebin goal
14%
SHARE
TWEET

Untitled

a guest Aug 10th, 2018 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. lines = ['Иванов Сергей 14 56n', 'Сергеев Петр 23 74n']
  2. myList = []
  3. for line in lines:
  4.     myList[line] = lines[line].split(' ')
  5.    
  6. In [182]: l
  7. Out[182]: ['Иванов Сергей 14 56n', 'Сергеев Петр 23 74n']
  8.    
  9. In [183]: [x.split() for x in l]
  10. Out[183]: [['Иванов', 'Сергей', '14', '56'], ['Сергеев', 'Петр', '23', '74']]
  11.    
  12. In [184]: list(map(str.split, l))
  13. Out[184]: [['Иванов', 'Сергей', '14', '56'], ['Сергеев', 'Петр', '23', '74']]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top