import random
class simulate_DNA:
def create_DNA(length):
sequence = ""
for i in range(length):
sequence = sequence + random.choice("ATGC")
return print(sequence)
def main():
length = 10
output_file = input("Enter output file path and name: ")
output_file = open(output_file, "w")
for i in range(10):
# simulate_DNA.create_DNA(length)
output_file.write(simulate_DNA.create_DNA(length))
output_file.readline()
output_file.close()
if __name__ == '__main__':
main()
I got this error after running the code above: TypeError: write() argument must be str, not None Would anyone please tell me how to fix this error? Thank you so much!