[ create a new paste ] login | about

Link: http://codepad.org/C5rIuQIy    [ raw code | output | fork ]

Python, pasted on Jun 22:
input  = """
NAME SECOND_1

ATOM 1 6 0 0 0 # ORB 1

ATOM 2 2 0 12/24 0 # ORB 2

ATOM 3 2 12/24 0 0 # ORB 2

ATOM 4 2 0 0 4/24 # ORB 3

ATOM 5 2 0 0 20/24 # ORB 3

ATOM 6 2 0 0 8/24 # ORB 3

ATOM 7 2 0 0 16/24 # ORB 3

ATOM 8 6 0 0 12/24 # ORB 1

ATOM 9 2 12/24 0 12/24 # ORB 2

ATOM 10 2 0 12/24 12/24 # ORB 2

#1

#2

#3
"""
print input.replace("ATOM", "1").replace("# ORB", " ")


Output:

NAME SECOND_1

1 1 6 0 0 0   1

1 2 2 0 12/24 0   2

1 3 2 12/24 0 0   2

1 4 2 0 0 4/24   3

1 5 2 0 0 20/24   3

1 6 2 0 0 8/24   3

1 7 2 0 0 16/24   3

1 8 6 0 0 12/24   1

1 9 2 12/24 0 12/24   2

1 10 2 0 12/24 12/24   2

#1

#2

#3



Create a new paste based on this one


Comments: