I'm a bit new to python so sorry if this is a basic question.
I have a file that looks something similar to this:
Zr 1 1 1
Zr 1 1 1
Zr 1 1 1
Zr 1 1 1
repeated over quite a few lines. I need to replace strings in the first column randomly with another specified string (edited for clarity), whilst keeping columns 2, 3, and 4 the same.
Any ideas how to do this? I get that I should feed the first column into an array, index each one and then randomly swap out, but I'm not sure how to proceed.
Thanks.
Kathryn :)
EDIT: FIXED.
Thanks for all of your help guys, just needed random.sample :)