I'm trying to get all the white moves from a log of a chess database,

> 
> 1. g3 d5 2. Bg2 Nf6 3. Nf3 c6 4. O-O Bf5 5. d3 e6 6. h3 Nbd7 7. Nh4 Bc5 8. Nxf5 exf5 9. d4 Bd6 10. e3 O-O 11. b3 Ne4 12. Bb2 Qa5 13. c4 dxc4 14. bxc4 b6 15. Qc2 Rfe8 16. Nc3 Ndf6 17. Ne2 Ba3 18. Bxa3 Qxa3 19. Nf4 Rad8 20. Nd3 Re7 21. Rfd1 Nc3 22. Rd2 Nfe4 23. Bxe4 Nxe4 24. Rdd1 Nc3 25. Rd2 Ne4 26. Rdd1 Nc3 27. Rd2 f6 28. Qb3 Qxb3 29. axb3 Kf7 30. Ra6 g6 31. Rc2 Ne4 32. Rca2 Rdd7 33. Ra1 Nd2 34. R1a3 h5 35. Nb4 Rc7 36. d5 c5 37. Nc6 Nf3+ 38. Kg2 Ne1+ 39. Kf1 Nc2 40. Rxa7 Nxa3 41. Rxa3 Re4 42. Ra6 h4 43. gxh4 Rxh4 44. Kg2 f4 45. exf4 Ke8 46. Rxb6 Rch7 47. Rb8+ Kd7 48. Rb7+ Kd6 49. Rxh7 Rxh7 50. Kg3 Rb7 51. Na5 Ra7 52. Nc6 Ra3 53. Kg4 Rxb3 54. f5 gxf5+ 55. Kxf5 Rf3+ 56. Kg4 Rxf2 57. h4 Rg2+ 58. Kf5 Rh2 59. Kxf6 Rxh4 60. Na5 Rf4+ 61. Kg5 Rf7 62. Kg6 Ra7 63. Nc6 Ra4 64. Kf6 Rxc4 65. Ne7 Re4 66. Nf5+ Kxd5 67. Ne7+ Rxe7 68. Kxe7 c4 {White resigns} 0-1
> 
> 
> 

this is an entire game, i have a lot in my log file

> 
> [g3, Bg2, Nf3, d3, h3, Nh4, Nf5, Bd6, e3, b3....etc]
> 
> 
> 

this is what i want to get

I need white pieces'move only ( i don't care about check +, capture x, castling 0-0, etc) i just want the name of piece B,R,Q,K, and the square where it goes.

Here's a snippet of what i've tried

```
a = logfile.readlines()
for lines in a:
    if lines.startswith('1. '):
        x = lines.split('. ')
        print(x)

```

> 
> ['1', 'g3 d5 2', 'Bg2 Nf6 3', 'Nf3 c6 4', 'O-O Bf5 5', 'd3 e6 6', 'h3 Nbd7 7', 'Nh4 Bc5 8', 'Nxf5 exf5 9', 'd4 Bd6 10', 'e3 O-O 11', 'b3 Ne4 12', 'Bb2 Qa5 13', 'c4 dxc4 14', 'bxc4..etc]
> 
> 
> 

this is my result, how can i remove the '1', '2', and obtain only a string?

i just need [g3, Bg2, Nf3, d3, h3...] Thanks, i hope it makes sense

---

i've found this way, if i print `print(x[0][0:3])` and make a for for the first [] i will obtain all the white's moves..

***28/11/202*** UPDATE
i'm here:

```
['g3']
['Bg2']
['Nf3']
['O-O']
['d3']
['h3']
['Nh4']
['Nxf5']
['d4']
['e3']
['b3']
['Bb2']
['c4']
['bxc4']
['Qc2']
['Nc3']
['Ne2']
['Bxa3']
['Nf4']
['Nd3']
['Rfd1']
['Rd2']
['Bxe4']
['Rdd1']
['Rd2']
['Rdd1']
['Rd2']
['Qb3']
['axb3']
['Ra6']
['Rc2']
['Rca2']
['Ra1']
['R1a3']
['Nb4']
['d5']
['Nc6']
['Kg2']
['Kf1']
['Rxa7']
['Rxa3']
['Ra6']
['gxh4']
['Kg2']
['exf4']
['Rxb6']
['Rb8+']
['Rb7+']
['Rxh7']
['Kg3']
['Na5']
['Nc6']
['Kg4']
['f5']
['Kxf5']
['Kg4']
['h4']
['Kf5']
['Kxf6']
['Na5']
['Kg5']
['Kg6']
['Nc6']
['Kf6']
['Ne7']
['Nf5+']
['Ne7+']
['Kxe7']

```

I have to remove castles "0-0" and "0-0-0" captures "x" and checks "+" what you suggest me to do? I try to iterete the list with a for loop

for moves in list:
if moves == '0-0':
list.remove(moves)

but i've got error ListIndex